(function(){
var _1,_2,_3,_4,_5={},_6={},_7=/\\/g;
var _8=function(_9,_a){
if(_9==null){
return null;
}
if(_9.Slick===true){
return _9;
}
_9=(""+_9).replace(/^\s+|\s+$/g,"");
_4=!!_a;
var _b=(_4)?_6:_5;
if(_b[_9]){
return _b[_9];
}
_1={Slick:true,expressions:[],raw:_9,reverse:function(){
return _8(this.raw,true);
}};
_2=-1;
while(_9!=(_9=_9.replace(_c,parser))){
}
_1.length=_1.expressions.length;
return _b[_9]=(_4)?_d(_1):_1;
};
var _e=function(_f){
if(_f==="!"){
return " ";
}else{
if(_f===" "){
return "!";
}else{
if((/^!/).test(_f)){
return _f.replace(/^!/,"");
}else{
return "!"+_f;
}
}
}
};
var _d=function(_10){
var _11=_10.expressions;
for(var i=0;i<_11.length;i++){
var exp=_11[i];
var _14={parts:[],tag:"*",combinator:_e(exp[0].combinator)};
for(var j=0;j<exp.length;j++){
var _16=exp[j];
if(!_16.reverseCombinator){
_16.reverseCombinator=" ";
}
_16.combinator=_16.reverseCombinator;
delete _16.reverseCombinator;
}
exp.reverse().push(_14);
}
return _10;
};
var _17=function(_18){
return _18.replace(/[-[\]{}()*+?.\\^$|,#\s]/g,"\\$&");
};
var _c=new RegExp("^(?:\\s*(,)\\s*|\\s*(<combinator>+)\\s*|(\\s+)|(<unicode>+|\\*)|\\#(<unicode>+)|\\.(<unicode>+)|\\[\\s*(<unicode1>+)(?:\\s*([*^$!~|]?=)(?:\\s*(?:([\"']?)(.*?)\\9)))?\\s*\\](?!\\])|:+(<unicode>+)(?:\\((?:(?:([\"'])([^\\12]*)\\12)|((?:\\([^)]+\\)|[^()]*)+))\\))?)".replace(/<combinator>/,"["+_17(">+~`!@$%^&={}\\;</")+"]").replace(/<unicode>/g,"(?:[\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])").replace(/<unicode1>/g,"(?:[:\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])"));
function parser(_19,_1a,_1b,_1c,_1d,id,_1f,_20,_21,_22,_23,_24,_25,_26,_27){
if(_1a||_2===-1){
_1.expressions[++_2]=[];
_3=-1;
if(_1a){
return "";
}
}
if(_1b||_1c||_3===-1){
_1b=_1b||" ";
var _28=_1.expressions[_2];
if(_4&&_28[_3]){
_28[_3].reverseCombinator=_e(_1b);
}
_28[++_3]={combinator:_1b,tag:"*"};
}
var _29=_1.expressions[_2][_3];
if(_1d){
_29.tag=_1d.replace(_7,"");
}else{
if(id){
_29.id=id.replace(_7,"");
}else{
if(_1f){
_1f=_1f.replace(_7,"");
if(!_29.classList){
_29.classList=[];
}
if(!_29.classes){
_29.classes=[];
}
_29.classList.push(_1f);
_29.classes.push({value:_1f,regexp:new RegExp("(^|\\s)"+_17(_1f)+"(\\s|$)")});
}else{
if(_24){
_27=_27||_26;
_27=_27?_27.replace(_7,""):null;
if(!_29.pseudos){
_29.pseudos=[];
}
_29.pseudos.push({key:_24.replace(_7,""),value:_27});
}else{
if(_20){
_20=_20.replace(_7,"");
_23=(_23||"").replace(_7,"");
var _2a,_c;
switch(_21){
case "^=":
_c=new RegExp("^"+_17(_23));
break;
case "$=":
_c=new RegExp(_17(_23)+"$");
break;
case "~=":
_c=new RegExp("(^|\\s)"+_17(_23)+"(\\s|$)");
break;
case "|=":
_c=new RegExp("^"+_17(_23)+"(-|$)");
break;
case "=":
_2a=function(_2b){
return _23==_2b;
};
break;
case "*=":
_2a=function(_2c){
return _2c&&_2c.indexOf(_23)>-1;
};
break;
case "!=":
_2a=function(_2d){
return _23!=_2d;
};
break;
default:
_2a=function(_2e){
return !!_2e;
};
}
if(_23==""&&(/^[*$^]=$/).test(_21)){
_2a=function(){
return false;
};
}
if(!_2a){
_2a=function(_2f){
return _2f&&_c.test(_2f);
};
}
if(!_29.attributes){
_29.attributes=[];
}
_29.attributes.push({key:_20,operator:_21,value:_23,test:_2a});
}
}
}
}
}
return "";
}
var _30=(this.Slick||{});
_30.parse=function(_31){
return _8(_31);
};
_30.escapeRegExp=_17;
if(!this.Slick){
this.Slick=_30;
}
}).apply((typeof exports!="undefined")?exports:this);
(function(){
var _32=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,_33=0,_34=Object.prototype.toString,_35=false,_36=true;
[0,0].sort(function(){
_36=false;
return 0;
});
var _37=function(_38,_39,_3a,_3b){
_3a=_3a||[];
_39=_39||document;
var _3c=_39;
if(_39.nodeType!==1&&_39.nodeType!==9){
return [];
}
if(!_38||typeof _38!=="string"){
return _3a;
}
var m,set,_3f,_40,ret,cur,pop,i,_45=true,_46=_37.isXML(_39),_47=[],_48=_38;
do{
_32.exec("");
m=_32.exec(_48);
if(m){
_48=m[3];
_47.push(m[1]);
if(m[2]){
_40=m[3];
break;
}
}
}while(m);
if(_47.length>1&&_49.exec(_38)){
if(_47.length===2&&_4a.relative[_47[0]]){
set=_4b(_47[0]+_47[1],_39);
}else{
set=_4a.relative[_47[0]]?[_39]:_37(_47.shift(),_39);
while(_47.length){
_38=_47.shift();
if(_4a.relative[_38]){
_38+=_47.shift();
}
set=_4b(_38,set);
}
}
}else{
if(!_3b&&_47.length>1&&_39.nodeType===9&&!_46&&_4a.match.ID.test(_47[0])&&!_4a.match.ID.test(_47[_47.length-1])){
ret=_37.find(_47.shift(),_39,_46);
_39=ret.expr?_37.filter(ret.expr,ret.set)[0]:ret.set[0];
}
if(_39){
ret=_3b?{expr:_47.pop(),set:_4c(_3b)}:_37.find(_47.pop(),_47.length===1&&(_47[0]==="~"||_47[0]==="+")&&_39.parentNode?_39.parentNode:_39,_46);
set=ret.expr?_37.filter(ret.expr,ret.set):ret.set;
if(_47.length>0){
_3f=_4c(set);
}else{
_45=false;
}
while(_47.length){
cur=_47.pop();
pop=cur;
if(!_4a.relative[cur]){
cur="";
}else{
pop=_47.pop();
}
if(pop==null){
pop=_39;
}
_4a.relative[cur](_3f,pop,_46);
}
}else{
_3f=_47=[];
}
}
if(!_3f){
_3f=set;
}
if(!_3f){
_37.error(cur||_38);
}
if(_34.call(_3f)==="[object Array]"){
if(!_45){
_3a.push.apply(_3a,_3f);
}else{
if(_39&&_39.nodeType===1){
for(i=0;_3f[i]!=null;i++){
if(_3f[i]&&(_3f[i]===true||_3f[i].nodeType===1&&_37.contains(_39,_3f[i]))){
_3a.push(set[i]);
}
}
}else{
for(i=0;_3f[i]!=null;i++){
if(_3f[i]&&_3f[i].nodeType===1){
_3a.push(set[i]);
}
}
}
}
}else{
_4c(_3f,_3a);
}
if(_40){
_37(_40,_3c,_3a,_3b);
_37.uniqueSort(_3a);
}
return _3a;
};
_37.uniqueSort=function(_4d){
if(_4e){
_35=_36;
_4d.sort(_4e);
if(_35){
for(var i=1;i<_4d.length;i++){
if(_4d[i]===_4d[i-1]){
_4d.splice(i--,1);
}
}
}
}
return _4d;
};
_37.matches=function(_50,set){
return _37(_50,null,null,set);
};
_37.matchesSelector=function(_52,_53){
return _37(_53,null,null,[_52]).length>0;
};
_37.find=function(_54,_55,_56){
var set;
if(!_54){
return [];
}
for(var i=0,l=_4a.order.length;i<l;i++){
var _5a,_5b=_4a.order[i];
if((_5a=_4a.leftMatch[_5b].exec(_54))){
var _5c=_5a[1];
_5a.splice(1,1);
if(_5c.substr(_5c.length-1)!=="\\"){
_5a[1]=(_5a[1]||"").replace(/\\/g,"");
set=_4a.find[_5b](_5a,_55,_56);
if(set!=null){
_54=_54.replace(_4a.match[_5b],"");
break;
}
}
}
}
if(!set){
set=_55.getElementsByTagName("*");
}
return {set:set,expr:_54};
};
_37.filter=function(_5d,set,_5f,not){
var _61,_62,old=_5d,_64=[],_65=set,_66=set&&set[0]&&_37.isXML(set[0]);
while(_5d&&set.length){
for(var _67 in _4a.filter){
if((_61=_4a.leftMatch[_67].exec(_5d))!=null&&_61[2]){
var _68,_69,_6a=_4a.filter[_67],_6b=_61[1];
_62=false;
_61.splice(1,1);
if(_6b.substr(_6b.length-1)==="\\"){
continue;
}
if(_65===_64){
_64=[];
}
if(_4a.preFilter[_67]){
_61=_4a.preFilter[_67](_61,_65,_5f,_64,not,_66);
if(!_61){
_62=_68=true;
}else{
if(_61===true){
continue;
}
}
}
if(_61){
for(var i=0;(_69=_65[i])!=null;i++){
if(_69){
_68=_6a(_69,_61,i,_65);
var _6d=not^!!_68;
if(_5f&&_68!=null){
if(_6d){
_62=true;
}else{
_65[i]=false;
}
}else{
if(_6d){
_64.push(_69);
_62=true;
}
}
}
}
}
if(_68!==undefined){
if(!_5f){
_65=_64;
}
_5d=_5d.replace(_4a.match[_67],"");
if(!_62){
return [];
}
break;
}
}
}
if(_5d===old){
if(_62==null){
_37.error(_5d);
}else{
break;
}
}
old=_5d;
}
return _65;
};
_37.error=function(msg){
throw "Syntax error, unrecognized expression: "+msg;
};
var _4a=_37.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(_6f){
return _6f.getAttribute("href");
}},relative:{"+":function(_70,_71){
var _72=typeof _71==="string",_73=_72&&!/\W/.test(_71),_74=_72&&!_73;
if(_73){
_71=_71.toLowerCase();
}
for(var i=0,l=_70.length,_77;i<l;i++){
if((_77=_70[i])){
while((_77=_77.previousSibling)&&_77.nodeType!==1){
}
_70[i]=_74||_77&&_77.nodeName.toLowerCase()===_71?_77||false:_77===_71;
}
}
if(_74){
_37.filter(_71,_70,true);
}
},">":function(_78,_79){
var _7a,_7b=typeof _79==="string",i=0,l=_78.length;
if(_7b&&!/\W/.test(_79)){
_79=_79.toLowerCase();
for(;i<l;i++){
_7a=_78[i];
if(_7a){
var _7e=_7a.parentNode;
_78[i]=_7e.nodeName.toLowerCase()===_79?_7e:false;
}
}
}else{
for(;i<l;i++){
_7a=_78[i];
if(_7a){
_78[i]=_7b?_7a.parentNode:_7a.parentNode===_79;
}
}
if(_7b){
_37.filter(_79,_78,true);
}
}
},"":function(_7f,_80,_81){
var _82,_83=_33++,_84=dirCheck;
if(typeof _80==="string"&&!/\W/.test(_80)){
_80=_80.toLowerCase();
_82=_80;
_84=dirNodeCheck;
}
_84("parentNode",_80,_83,_7f,_82,_81);
},"~":function(_85,_86,_87){
var _88,_89=_33++,_8a=dirCheck;
if(typeof _86==="string"&&!/\W/.test(_86)){
_86=_86.toLowerCase();
_88=_86;
_8a=dirNodeCheck;
}
_8a("previousSibling",_86,_89,_85,_88,_87);
}},find:{ID:function(_8b,_8c,_8d){
if(typeof _8c.getElementById!=="undefined"&&!_8d){
var m=_8c.getElementById(_8b[1]);
return m&&m.parentNode?[m]:[];
}
},NAME:function(_8f,_90){
if(typeof _90.getElementsByName!=="undefined"){
var ret=[],_92=_90.getElementsByName(_8f[1]);
for(var i=0,l=_92.length;i<l;i++){
if(_92[i].getAttribute("name")===_8f[1]){
ret.push(_92[i]);
}
}
return ret.length===0?null:ret;
}
},TAG:function(_95,_96){
return _96.getElementsByTagName(_95[1]);
}},preFilter:{CLASS:function(_97,_98,_99,_9a,not,_9c){
_97=" "+_97[1].replace(/\\/g,"")+" ";
if(_9c){
return _97;
}
for(var i=0,_9e;(_9e=_98[i])!=null;i++){
if(_9e){
if(not^(_9e.className&&(" "+_9e.className+" ").replace(/[\t\n\r]/g," ").indexOf(_97)>=0)){
if(!_99){
_9a.push(_9e);
}
}else{
if(_99){
_98[i]=false;
}
}
}
}
return false;
},ID:function(_9f){
return _9f[1].replace(/\\/g,"");
},TAG:function(_a0,_a1){
return _a0[1].toLowerCase();
},CHILD:function(_a2){
if(_a2[1]==="nth"){
if(!_a2[2]){
_37.error(_a2[0]);
}
_a2[2]=_a2[2].replace(/^\+|\s*/g,"");
var _a3=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(_a2[2]==="even"&&"2n"||_a2[2]==="odd"&&"2n+1"||!/\D/.test(_a2[2])&&"0n+"+_a2[2]||_a2[2]);
_a2[2]=(_a3[1]+(_a3[2]||1))-0;
_a2[3]=_a3[3]-0;
}else{
if(_a2[2]){
_37.error(_a2[0]);
}
}
_a2[0]=_33++;
return _a2;
},ATTR:function(_a4,_a5,_a6,_a7,not,_a9){
var _aa=_a4[1].replace(/\\/g,"");
if(!_a9&&_4a.attrMap[_aa]){
_a4[1]=_4a.attrMap[_aa];
}
if(_a4[2]==="~="){
_a4[4]=" "+_a4[4]+" ";
}
return _a4;
},PSEUDO:function(_ab,_ac,_ad,_ae,not){
if(_ab[1]==="not"){
if((_32.exec(_ab[3])||"").length>1||/^\w/.test(_ab[3])){
_ab[3]=_37(_ab[3],null,null,_ac);
}else{
var ret=_37.filter(_ab[3],_ac,_ad,true^not);
if(!_ad){
_ae.push.apply(_ae,ret);
}
return false;
}
}else{
if(_4a.match.POS.test(_ab[0])||_4a.match.CHILD.test(_ab[0])){
return true;
}
}
return _ab;
},POS:function(_b1){
_b1.unshift(true);
return _b1;
}},filters:{enabled:function(_b2){
return _b2.disabled===false&&_b2.type!=="hidden";
},disabled:function(_b3){
return _b3.disabled===true;
},checked:function(_b4){
return _b4.checked===true;
},selected:function(_b5){
_b5.parentNode.selectedIndex;
return _b5.selected===true;
},parent:function(_b6){
return !!_b6.firstChild;
},empty:function(_b7){
return !_b7.firstChild;
},has:function(_b8,i,_ba){
return !!_37(_ba[3],_b8).length;
},header:function(_bb){
return (/h\d/i).test(_bb.nodeName);
},text:function(_bc){
return "text"===_bc.type;
},radio:function(_bd){
return "radio"===_bd.type;
},checkbox:function(_be){
return "checkbox"===_be.type;
},file:function(_bf){
return "file"===_bf.type;
},password:function(_c0){
return "password"===_c0.type;
},submit:function(_c1){
return "submit"===_c1.type;
},image:function(_c2){
return "image"===_c2.type;
},reset:function(_c3){
return "reset"===_c3.type;
},button:function(_c4){
return "button"===_c4.type||_c4.nodeName.toLowerCase()==="button";
},input:function(_c5){
return (/input|select|textarea|button/i).test(_c5.nodeName);
}},setFilters:{first:function(_c6,i){
return i===0;
},last:function(_c8,i,_ca,_cb){
return i===_cb.length-1;
},even:function(_cc,i){
return i%2===0;
},odd:function(_ce,i){
return i%2===1;
},lt:function(_d0,i,_d2){
return i<_d2[3]-0;
},gt:function(_d3,i,_d5){
return i>_d5[3]-0;
},nth:function(_d6,i,_d8){
return _d8[3]-0===i;
},eq:function(_d9,i,_db){
return _db[3]-0===i;
}},filter:{PSEUDO:function(_dc,_dd,i,_df){
var _e0=_dd[1],_e1=_4a.filters[_e0];
if(_e1){
return _e1(_dc,i,_dd,_df);
}else{
if(_e0==="contains"){
return (_dc.textContent||_dc.innerText||_37.getText([_dc])||"").indexOf(_dd[3])>=0;
}else{
if(_e0==="not"){
var not=_dd[3];
for(var j=0,l=not.length;j<l;j++){
if(not[j]===_dc){
return false;
}
}
return true;
}else{
_37.error(_e0);
}
}
}
},CHILD:function(_e5,_e6){
var _e7=_e6[1],_e8=_e5;
switch(_e7){
case "only":
case "first":
while((_e8=_e8.previousSibling)){
if(_e8.nodeType===1){
return false;
}
}
if(_e7==="first"){
return true;
}
_e8=_e5;
case "last":
while((_e8=_e8.nextSibling)){
if(_e8.nodeType===1){
return false;
}
}
return true;
case "nth":
var _e9=_e6[2],_ea=_e6[3];
if(_e9===1&&_ea===0){
return true;
}
var _eb=_e6[0],_ec=_e5.parentNode;
if(_ec&&(_ec.sizcache!==_eb||!_e5.nodeIndex)){
var _ed=0;
for(_e8=_ec.firstChild;_e8;_e8=_e8.nextSibling){
if(_e8.nodeType===1){
_e8.nodeIndex=++_ed;
}
}
_ec.sizcache=_eb;
}
var _ee=_e5.nodeIndex-_ea;
if(_e9===0){
return _ee===0;
}else{
return (_ee%_e9===0&&_ee/_e9>=0);
}
}
},ID:function(_ef,_f0){
return _ef.nodeType===1&&_ef.getAttribute("id")===_f0;
},TAG:function(_f1,_f2){
return (_f2==="*"&&_f1.nodeType===1)||_f1.nodeName.toLowerCase()===_f2;
},CLASS:function(_f3,_f4){
return (" "+(_f3.className||_f3.getAttribute("class"))+" ").indexOf(_f4)>-1;
},ATTR:function(_f5,_f6){
var _f7=_f6[1],_f8=_4a.attrHandle[_f7]?_4a.attrHandle[_f7](_f5):_f5[_f7]!=null?_f5[_f7]:_f5.getAttribute(_f7),_f9=_f8+"",_fa=_f6[2],_fb=_f6[4];
return _f8==null?_fa==="!=":_fa==="="?_f9===_fb:_fa==="*="?_f9.indexOf(_fb)>=0:_fa==="~="?(" "+_f9+" ").indexOf(_fb)>=0:!_fb?_f9&&_f8!==false:_fa==="!="?_f9!==_fb:_fa==="^="?_f9.indexOf(_fb)===0:_fa==="$="?_f9.substr(_f9.length-_fb.length)===_fb:_fa==="|="?_f9===_fb||_f9.substr(0,_fb.length+1)===_fb+"-":false;
},POS:function(_fc,_fd,i,_ff){
var name=_fd[2],_101=_4a.setFilters[name];
if(_101){
return _101(_fc,i,_fd,_ff);
}
}}};
var _49=_4a.match.POS,_102=function(all,num){
return "\\"+(num-0+1);
};
for(var type in _4a.match){
_4a.match[type]=new RegExp(_4a.match[type].source+(/(?![^\[]*\])(?![^\(]*\))/.source));
_4a.leftMatch[type]=new RegExp(/(^(?:.|\r|\n)*?)/.source+_4a.match[type].source.replace(/\\(\d+)/g,_102));
}
var _4c=function(_106,_107){
_106=Array.prototype.slice.call(_106,0);
if(_107){
_107.push.apply(_107,_106);
return _107;
}
return _106;
};
try{
Array.prototype.slice.call(document.documentElement.childNodes,0)[0].nodeType;
}
catch(e){
_4c=function(_108,_109){
var i=0,ret=_109||[];
if(_34.call(_108)==="[object Array]"){
Array.prototype.push.apply(ret,_108);
}else{
if(typeof _108.length==="number"){
for(var l=_108.length;i<l;i++){
ret.push(_108[i]);
}
}else{
for(;_108[i];i++){
ret.push(_108[i]);
}
}
}
return ret;
};
}
var _4e,_10d;
if(document.documentElement.compareDocumentPosition){
_4e=function(a,b){
if(a===b){
_35=true;
return 0;
}
if(!a.compareDocumentPosition||!b.compareDocumentPosition){
return a.compareDocumentPosition?-1:1;
}
return a.compareDocumentPosition(b)&4?-1:1;
};
}else{
_4e=function(a,b){
var al,bl,ap=[],bp=[],aup=a.parentNode,bup=b.parentNode,cur=aup;
if(a===b){
_35=true;
return 0;
}else{
if(aup===bup){
return _10d(a,b);
}else{
if(!aup){
return -1;
}else{
if(!bup){
return 1;
}
}
}
}
while(cur){
ap.unshift(cur);
cur=cur.parentNode;
}
cur=bup;
while(cur){
bp.unshift(cur);
cur=cur.parentNode;
}
al=ap.length;
bl=bp.length;
for(var i=0;i<al&&i<bl;i++){
if(ap[i]!==bp[i]){
return _10d(ap[i],bp[i]);
}
}
return i===al?_10d(a,bp[i],-1):_10d(ap[i],b,1);
};
_10d=function(a,b,ret){
if(a===b){
return ret;
}
var cur=a.nextSibling;
while(cur){
if(cur===b){
return -1;
}
cur=cur.nextSibling;
}
return 1;
};
}
_37.getText=function(_11e){
var ret="",elem;
for(var i=0;_11e[i];i++){
elem=_11e[i];
if(elem.nodeType===3||elem.nodeType===4){
ret+=elem.nodeValue;
}else{
if(elem.nodeType!==8){
ret+=_37.getText(elem.childNodes);
}
}
}
return ret;
};
(function(){
var form=document.createElement("div"),id="script"+(new Date()).getTime(),root=document.documentElement;
form.innerHTML="<a name='"+id+"'/>";
root.insertBefore(form,root.firstChild);
if(document.getElementById(id)){
_4a.find.ID=function(_125,_126,_127){
if(typeof _126.getElementById!=="undefined"&&!_127){
var m=_126.getElementById(_125[1]);
return m?m.id===_125[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===_125[1]?[m]:undefined:[];
}
};
_4a.filter.ID=function(elem,_12a){
var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");
return elem.nodeType===1&&node&&node.nodeValue===_12a;
};
}
root.removeChild(form);
root=form=null;
})();
(function(){
var div=document.createElement("div");
div.appendChild(document.createComment(""));
if(div.getElementsByTagName("*").length>0){
_4a.find.TAG=function(_12d,_12e){
var _12f=_12e.getElementsByTagName(_12d[1]);
if(_12d[1]==="*"){
var tmp=[];
for(var i=0;_12f[i];i++){
if(_12f[i].nodeType===1){
tmp.push(_12f[i]);
}
}
_12f=tmp;
}
return _12f;
};
}
div.innerHTML="<a href='#'></a>";
if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){
_4a.attrHandle.href=function(elem){
return elem.getAttribute("href",2);
};
}
div=null;
})();
if(document.querySelectorAll){
(function(){
var _133=_37,div=document.createElement("div"),id="__sizzle__";
div.innerHTML="<p class='TEST'></p>";
if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){
return;
}
_37=function(_136,_137,_138,seed){
_137=_137||document;
_136=_136.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");
if(!seed&&!_37.isXML(_137)){
if(_137.nodeType===9){
try{
return _4c(_137.querySelectorAll(_136),_138);
}
catch(qsaError){
}
}else{
if(_137.nodeType===1&&_137.nodeName.toLowerCase()!=="object"){
var old=_137.getAttribute("id"),nid=old||id,_13c=_137.parentNode,_13d=/^\s*[+~]/.test(_136);
if(!old){
_137.setAttribute("id",nid);
}else{
nid=nid.replace(/'/g,"\\$&");
}
if(_13d&&_13c){
_137=_137.parentNode;
}
try{
if(!_13d||_13c){
return _4c(_137.querySelectorAll("[id='"+nid+"'] "+_136),_138);
}
}
catch(pseudoError){
}
finally{
if(!old){
_137.removeAttribute("id");
}
}
}
}
}
return _133(_136,_137,_138,seed);
};
for(var prop in _133){
_37[prop]=_133[prop];
}
div=null;
})();
}
(function(){
var html=document.documentElement,_140=html.matchesSelector||html.mozMatchesSelector||html.webkitMatchesSelector||html.msMatchesSelector,_141=false;
try{
_140.call(document.documentElement,"[test!='']:sizzle");
}
catch(pseudoError){
_141=true;
}
if(_140){
_37.matchesSelector=function(node,expr){
expr=expr.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");
if(!_37.isXML(node)){
try{
if(_141||!_4a.match.PSEUDO.test(expr)&&!/!=/.test(expr)){
return _140.call(node,expr);
}
}
catch(e){
}
}
return _37(expr,null,null,[node]).length>0;
};
}
})();
(function(){
var div=document.createElement("div");
div.innerHTML="<div class='test e'></div><div class='test'></div>";
if(!div.getElementsByClassName||div.getElementsByClassName("e").length===0){
return;
}
div.lastChild.className="e";
if(div.getElementsByClassName("e").length===1){
return;
}
_4a.order.splice(1,0,"CLASS");
_4a.find.CLASS=function(_145,_146,_147){
if(typeof _146.getElementsByClassName!=="undefined"&&!_147){
return _146.getElementsByClassName(_145[1]);
}
};
div=null;
})();
function dirNodeCheck(dir,cur,_14a,_14b,_14c,_14d){
for(var i=0,l=_14b.length;i<l;i++){
var elem=_14b[i];
if(elem){
var _151=false;
elem=elem[dir];
while(elem){
if(elem.sizcache===_14a){
_151=_14b[elem.sizset];
break;
}
if(elem.nodeType===1&&!_14d){
elem.sizcache=_14a;
elem.sizset=i;
}
if(elem.nodeName.toLowerCase()===cur){
_151=elem;
break;
}
elem=elem[dir];
}
_14b[i]=_151;
}
}
}
function dirCheck(dir,cur,_154,_155,_156,_157){
for(var i=0,l=_155.length;i<l;i++){
var elem=_155[i];
if(elem){
var _15b=false;
elem=elem[dir];
while(elem){
if(elem.sizcache===_154){
_15b=_155[elem.sizset];
break;
}
if(elem.nodeType===1){
if(!_157){
elem.sizcache=_154;
elem.sizset=i;
}
if(typeof cur!=="string"){
if(elem===cur){
_15b=true;
break;
}
}else{
if(_37.filter(cur,[elem]).length>0){
_15b=elem;
break;
}
}
}
elem=elem[dir];
}
_155[i]=_15b;
}
}
}
if(document.documentElement.contains){
_37.contains=function(a,b){
return a!==b&&(a.contains?a.contains(b):true);
};
}else{
if(document.documentElement.compareDocumentPosition){
_37.contains=function(a,b){
return !!(a.compareDocumentPosition(b)&16);
};
}else{
_37.contains=function(){
return false;
};
}
}
_37.isXML=function(elem){
var _161=(elem?elem.ownerDocument||elem:0).documentElement;
return _161?_161.nodeName!=="HTML":false;
};
var _4b=function(_162,_163){
var _164,_165=[],_166="",root=_163.nodeType?[_163]:_163;
while((_164=_4a.match.PSEUDO.exec(_162))){
_166+=_164[0];
_162=_162.replace(_4a.match.PSEUDO,"");
}
_162=_4a.relative[_162]?_162+"*":_162;
for(var i=0,l=root.length;i<l;i++){
_37(_162,root[i],_165);
}
return _37.filter(_166,_165);
};
window.Sizzle=_37;
})();
var Mustache=function(){
var _16a=function(){
};
_16a.prototype={otag:"{{",ctag:"}}",pragmas:{},buffer:[],pragmas_implemented:{"IMPLICIT-ITERATOR":true},context:{},render:function(_16b,_16c,_16d,_16e){
if(!_16e){
this.context=_16c;
this.buffer=[];
}
if(!this.includes("",_16b)){
if(_16e){
return _16b;
}else{
this.send(_16b);
return;
}
}
_16b=this.render_pragmas(_16b);
var html=this.render_section(_16b,_16c,_16d);
if(_16e){
return this.render_tags(html,_16c,_16d,_16e);
}
this.render_tags(html,_16c,_16d,_16e);
},send:function(line){
if(line!=""){
this.buffer.push(line);
}
},render_pragmas:function(_171){
if(!this.includes("%",_171)){
return _171;
}
var that=this;
var _173=new RegExp(this.otag+"%([\\w-]+) ?([\\w]+=[\\w]+)?"+this.ctag);
return _171.replace(_173,function(_174,_175,_176){
if(!that.pragmas_implemented[_175]){
throw ({message:"This implementation of mustache doesn't understand the '"+_175+"' pragma"});
}
that.pragmas[_175]={};
if(_176){
var opts=_176.split("=");
that.pragmas[_175][opts[0]]=opts[1];
}
return "";
});
},render_partial:function(name,_179,_17a){
name=this.trim(name);
if(!_17a||_17a[name]===undefined){
throw ({message:"unknown_partial '"+name+"'"});
}
if(typeof (_179[name])!="object"){
return this.render(_17a[name],_179,_17a,true);
}
return this.render(_17a[name],_179[name],_17a,true);
},render_section:function(_17b,_17c,_17d){
if(!this.includes("#",_17b)&&!this.includes("^",_17b)){
return _17b;
}
var that=this;
var _17f=new RegExp(this.otag+"(\\^|\\#)\\s*(.+)\\s*"+this.ctag+"\n*([\\s\\S]+?)"+this.otag+"\\/\\s*\\2\\s*"+this.ctag+"\\s*","mg");
return _17b.replace(_17f,function(_180,type,name,_183){
var _184=that.find(name,_17c);
if(type=="^"){
if(!_184||that.is_array(_184)&&_184.length===0){
return that.render(_183,_17c,_17d,true);
}else{
return "";
}
}else{
if(type=="#"){
if(that.is_array(_184)){
return that.map(_184,function(row){
return that.render(_183,that.create_context(row),_17d,true);
}).join("");
}else{
if(that.is_object(_184)){
return that.render(_183,that.create_context(_184),_17d,true);
}else{
if(typeof _184==="function"){
return _184.call(_17c,_183,function(text){
return that.render(text,_17c,_17d,true);
});
}else{
if(_184){
return that.render(_183,_17c,_17d,true);
}else{
return "";
}
}
}
}
}
}
});
},render_tags:function(_187,_188,_189,_18a){
var that=this;
var _18c=function(){
return new RegExp(that.otag+"(=|!|>|\\{|%)?([^\\/#\\^]+?)\\1?"+that.ctag+"+","g");
};
var _18d=_18c();
var _18e=function(_18f,_190,name){
switch(_190){
case "!":
return "";
case "=":
that.set_delimiters(name);
_18d=_18c();
return "";
case ">":
return that.render_partial(name,_188,_189);
case "{":
return that.find(name,_188);
default:
return that.escape(that.find(name,_188));
}
};
var _192=_187.split("\n");
for(var i=0;i<_192.length;i++){
_192[i]=_192[i].replace(_18d,_18e,this);
if(!_18a){
this.send(_192[i]);
}
}
if(_18a){
return _192.join("\n");
}
},set_delimiters:function(_194){
var dels=_194.split(" ");
this.otag=this.escape_regex(dels[0]);
this.ctag=this.escape_regex(dels[1]);
},escape_regex:function(text){
if(!arguments.callee.sRE){
var _197=["/",".","*","+","?","|","(",")","[","]","{","}","\\"];
arguments.callee.sRE=new RegExp("(\\"+_197.join("|\\")+")","g");
}
return text.replace(arguments.callee.sRE,"\\$1");
},find:function(name,_199){
name=this.trim(name);
function is_kinda_truthy(bool){
return bool===false||bool===0||bool;
}
var _19b;
if(is_kinda_truthy(_199[name])){
_19b=_199[name];
}else{
if(is_kinda_truthy(this.context[name])){
_19b=this.context[name];
}
}
if(typeof _19b==="function"){
return _19b.apply(_199);
}
if(_19b!==undefined){
return _19b;
}
return "";
},includes:function(_19c,_19d){
return _19d.indexOf(this.otag+_19c)!=-1;
},escape:function(s){
s=String(s===null?"":s);
return s.replace(/&(?!\w+;)|["'<>\\]/g,function(s){
switch(s){
case "&":
return "&amp;";
case "\\":
return "\\\\";
case "\"":
return "&quot;";
case "'":
return "&#39;";
case "<":
return "&lt;";
case ">":
return "&gt;";
default:
return s;
}
});
},create_context:function(_1a0){
if(this.is_object(_1a0)){
return _1a0;
}else{
var _1a1=".";
if(this.pragmas["IMPLICIT-ITERATOR"]){
_1a1=this.pragmas["IMPLICIT-ITERATOR"].iterator;
}
var ctx={};
ctx[_1a1]=_1a0;
return ctx;
}
},is_object:function(a){
return a&&typeof a=="object";
},is_array:function(a){
return Object.prototype.toString.call(a)==="[object Array]";
},trim:function(s){
return s.replace(/^\s*|\s*$/g,"");
},map:function(_1a6,fn){
if(typeof _1a6.map=="function"){
return _1a6.map(fn);
}else{
var r=[];
var l=_1a6.length;
for(var i=0;i<l;i++){
r.push(fn(_1a6[i]));
}
return r;
}
}};
return ({name:"mustache.js",version:"0.3.1-dev",to_html:function(_1ab,view,_1ad,_1ae){
var _1af=new _16a();
if(_1ae){
_1af.send=_1ae;
}
_1af.render(_1ab,view,_1ad);
if(!_1ae){
return _1af.buffer.join("\n");
}
}});
}();
if(!this.JSON){
this.JSON={};
}
(function(){
"use strict";
function f(n){
return n<10?"0"+n:n;
}
if(typeof Date.prototype.toJSON!=="function"){
Date.prototype.toJSON=function(key){
return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null;
};
String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){
return this.valueOf();
};
}
var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_1b4=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,_1b6,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\"":"\\\"","\\":"\\\\"},rep;
function quote(_1b9){
_1b4.lastIndex=0;
return _1b4.test(_1b9)?"\""+_1b9.replace(_1b4,function(a){
var c=meta[a];
return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4);
})+"\"":"\""+_1b9+"\"";
}
function str(key,_1bd){
var i,k,v,_1c1,mind=gap,_1c3,_1c4=_1bd[key];
if(_1c4&&typeof _1c4==="object"&&typeof _1c4.toJSON==="function"){
_1c4=_1c4.toJSON(key);
}
if(typeof rep==="function"){
_1c4=rep.call(_1bd,key,_1c4);
}
switch(typeof _1c4){
case "string":
return quote(_1c4);
case "number":
return isFinite(_1c4)?String(_1c4):"null";
case "boolean":
case "null":
return String(_1c4);
case "object":
if(!_1c4){
return "null";
}
gap+=_1b6;
_1c3=[];
if(Object.prototype.toString.apply(_1c4)==="[object Array]"){
_1c1=_1c4.length;
for(i=0;i<_1c1;i+=1){
_1c3[i]=str(i,_1c4)||"null";
}
v=_1c3.length===0?"[]":gap?"[\n"+gap+_1c3.join(",\n"+gap)+"\n"+mind+"]":"["+_1c3.join(",")+"]";
gap=mind;
return v;
}
if(rep&&typeof rep==="object"){
_1c1=rep.length;
for(i=0;i<_1c1;i+=1){
k=rep[i];
if(typeof k==="string"){
v=str(k,_1c4);
if(v){
_1c3.push(quote(k)+(gap?": ":":")+v);
}
}
}
}else{
for(k in _1c4){
if(Object.hasOwnProperty.call(_1c4,k)){
v=str(k,_1c4);
if(v){
_1c3.push(quote(k)+(gap?": ":":")+v);
}
}
}
}
v=_1c3.length===0?"{}":gap?"{\n"+gap+_1c3.join(",\n"+gap)+"\n"+mind+"}":"{"+_1c3.join(",")+"}";
gap=mind;
return v;
}
}
if(typeof JSON.stringify!=="function"){
JSON.stringify=function(_1c5,_1c6,_1c7){
var i;
gap="";
_1b6="";
if(typeof _1c7==="number"){
for(i=0;i<_1c7;i+=1){
_1b6+=" ";
}
}else{
if(typeof _1c7==="string"){
_1b6=_1c7;
}
}
rep=_1c6;
if(_1c6&&typeof _1c6!=="function"&&(typeof _1c6!=="object"||typeof _1c6.length!=="number")){
throw new Error("JSON.stringify");
}
return str("",{"":_1c5});
};
}
if(typeof JSON.parse!=="function"){
JSON.parse=function(text,_1ca){
var j;
function walk(_1cc,key){
var k,v,_1d0=_1cc[key];
if(_1d0&&typeof _1d0==="object"){
for(k in _1d0){
if(Object.hasOwnProperty.call(_1d0,k)){
v=walk(_1d0,k);
if(v!==undefined){
_1d0[k]=v;
}else{
delete _1d0[k];
}
}
}
}
return _1ca.call(_1cc,key,_1d0);
}
text=String(text);
cx.lastIndex=0;
if(cx.test(text)){
text=text.replace(cx,function(a){
return "\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4);
});
}
if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){
j=eval("("+text+")");
return typeof _1ca==="function"?walk({"":j},""):j;
}
throw new SyntaxError("JSON.parse");
};
}
}());
var object=new (function(_1d2){
var _1d3=this;
Object.keys=function(o){
var _1d5=[];
for(var name in o){
if(o.hasOwnProperty(name)){
_1d5.push(name);
}
}
if(o.call!==undefined&&o.call!==Function.prototype.call&&_1d5.indexOf("call")===-1){
_1d5.push("call");
}
return _1d5;
};
Array.isArray=Array.isArray||function(o){
return Object.prototype.toString.call(o)==="[object Array]";
};
Array.prototype.forEach=Array.prototype.forEach||function(fn,bind){
for(var i=0;i<this.length;i++){
fn.call(bind,this[i],i,this);
}
};
Array.prototype.indexOf=Array.prototype.indexOf||function(str){
for(var i=0;i<this.length;i++){
if(str==this[i]){
return i;
}
}
return -1;
};
Array.prototype.some=Array.prototype.some||function(fn,bind){
for(var i=0,l=this.length;i<l;i++){
if((i in this)&&fn.call(bind,this[i],i,this)){
return true;
}
}
return false;
};
Array.prototype.every=Array.prototype.every||function(fn,bind){
for(var i=0,l=this.length;i<l;i++){
if((i in this)&&!fn.call(bind,this[i],i,this)){
return false;
}
}
return true;
};
Array.prototype.map=Array.prototype.map||function(fn,bind){
var _1e7=[];
for(var i=0,l=this.length;i<l;i++){
if(i in this){
_1e7[i]=fn.call(bind,this[i],i,this);
}
}
return _1e7;
};
Array.prototype.filter=Array.prototype.filter||function(fn,bind){
var _1ec=[];
for(var i=0,l=this.length;i<l;i++){
if((i in this)&&fn.call(bind,this[i],i,this)){
_1ec.push(this[i]);
}
}
return _1ec;
};
Array.prototype.reduce=Array.prototype.reduce||function(fun){
"use strict";
if(this===undefined||this===null){
throw new TypeError();
}
var t=Object(this);
var len=t.length>>>0;
if(typeof fun!=="function"){
throw new TypeError();
}
if(len===0&&arguments.length==1){
throw new TypeError();
}
var k=0;
var _1f3;
if(arguments.length>=2){
_1f3=arguments[1];
}else{
do{
if(k in t){
_1f3=t[k++];
break;
}
if(++k>=len){
throw new TypeError();
}
}while(true);
}
while(k<len){
if(k in t){
_1f3=fun.call(undefined,_1f3,t[k],k,t);
}
k++;
}
return _1f3;
};
Array.prototype.reduceRight=Array.prototype.reduceRight||function(_1f4){
"use strict";
if(this===undefined||this===null){
throw new TypeError();
}
var t=Object(this);
var len=t.length>>>0;
if(typeof _1f4!=="function"){
throw new TypeError();
}
if(len===0&&arguments.length===1){
throw new TypeError();
}
var k=len-1;
var _1f8;
if(arguments.length>=2){
_1f8=arguments[1];
}else{
do{
if(k in this){
_1f8=this[k--];
break;
}
if(--k<0){
throw new TypeError();
}
}while(true);
}
while(k>=0){
if(k in t){
_1f8=_1f4.call(undefined,_1f8,t[k],k,t);
}
k--;
}
return _1f8;
};
String.prototype.trim=String.prototype.trim||function(){
return this.replace(/^\s\s*/,"").replace(/\s\s*$/,"");
};
if(!Function.prototype.bind||Function.prototype.bind===window.__hualuOldBind){
Function.prototype.bind=function(_1f9){
var _1fa=this;
return function(){
_1fa.apply(_1f9,arguments);
};
};
}
if((function TEST(){
}).name){
Function.__get_name__=function(func){
return func.name;
};
}else{
var _1fc=/^function ([\w$]+)/;
Function.__get_name__=function(func){
var _1fe=_1fc.exec(func.toString());
if(_1fe){
return _1fe[1];
}
return "";
};
}
this.extend=function(obj,_200,ov){
if(ov!==false){
ov=true;
}
for(var _202 in _200){
if(ov||obj[_202]===undefined){
obj[_202]=_200[_202];
}
}
if(_200&&_200.hasOwnProperty("call")){
obj.call=_200.call;
}
return obj;
};
this.clone=function(obj){
var _204={};
for(var key in obj){
_204[key]=obj[key];
}
return _204;
};
this.bind=function(host){
_1d3.extend(host,_1d3);
};
this._loader=null;
this.use=function(){
if(!_1d3._loader){
_1d3._loader=new Loader();
}
_1d3._loader.use.apply(_1d3._loader,arguments);
};
this.execute=function(){
if(!_1d3._loader){
_1d3._loader=new Loader();
}
_1d3._loader.execute.apply(_1d3._loader,arguments);
};
this.add=function(){
if(!_1d3._loader){
_1d3._loader=new Loader();
}
_1d3._loader.add.apply(_1d3._loader,arguments);
};
})(window);
(function(){
var _207=true;
for(var i in {toString:1}){
_207=null;
}
if(_207){
_207=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"];
}
var _209=function(func,_20b){
return function(a,b){
if(a===null){
return this;
}
if(_20b||typeof a!="string"){
for(var k in a){
func.call(this,k,a[k]);
}
if(_207){
for(var i=_207.length;i>0;i--){
k=_207[i];
if(a.hasOwnProperty(k)){
func.call(this,k,a[k]);
}
}
}
}else{
func.call(this,a,b);
}
return this;
};
};
var _210=function(prop){
var _212=this.__properties__[prop];
if(_212&&_212.fget){
return _212.fget.call(this.__this__,this);
}else{
throw "get not defined property "+prop;
}
};
var _213=function(prop,_215){
var _216=this.__properties__[prop];
if(_216&&_216.fset){
_216.fset.call(this.__this__,this,_215);
}else{
throw "set not defined property "+prop;
}
};
var _217=function(name){
var cls=this;
var _21a=this.prototype;
var _21b=_21a.__properties__;
if(name in cls){
return cls[name];
}
if(name in _21b){
return _21b[name];
}
if(!name in _21a){
throw new Error("no member named "+name+".");
}
var _21c=_21a[name];
if(!_21c){
return _21c;
}
if(_21c.__class__=_21d){
return _21d(_21c.im_func,this);
}
return _21c;
};
var _21e=_209(function(name,_220){
var cls=this;
var _222=cls.prototype;
var _223=_222.__properties__;
var subs=cls.__subclassesarray__;
var _225=cls.__constructing__;
if(!_225){
delete cls[name];
delete _222[name];
delete _223[name];
}
if(name=="@mixins"){
name="__mixins__";
}
if(["__new__","__metaclass__","__mixins__"].indexOf(name)!=-1){
cls[name]=_220;
}else{
if(["__this__","__base__"].indexOf(name)!=-1){
cls[name]=_222[name]=_220;
}else{
if(_220==null){
_222[name]=_220;
}else{
if(_220.__class__===undefined&&typeof _220=="function"){
_220.__name__=name;
_222[name]=_21d(_220);
_222[name].__name__=name;
if(name=="initialize"){
cls[name]=_21d(_220,cls);
}
}else{
if(_220.__class__===property){
_220.__name__=name;
_223[name]=_220;
}else{
if(_220.__class__===classmethod){
_220.im_func.__name__=name;
_220.__name__=name;
cls[name]=_222[name]=_220;
}else{
if(_220.__class__===staticmethod){
_220.im_func.__name__=name;
_220.__name__=name;
cls[name]=_222[name]=_220.im_func;
}else{
_222[name]=_220;
}
}
}
}
}
}
}
if(!_225&&name in cls&&subs){
subs.forEach(function(sub){
if(!name in sub){
sub.set(name,_220);
}
});
}
});
var _227=function(prop,_229){
this[prop]=_229;
};
var _22a=function(){
return this.__subclassesarray__;
};
var _22b=(function(){
if(!Array.push){
return false;
}
var a=function(){
};
a.prototype=new Array;
var b=new a;
b.push(null);
return !!b.length;
})();
var _22e,_22f;
var type=this.type=function(){
};
type.__new__=function(_231,name,base,dict){
var cls=Class.create();
cls.__constructing__=true;
cls.prototype=Class.getInstance(base);
cls.prototype.constructor=cls;
if(base.__subclassesarray__){
base.__subclassesarray__.push(cls);
}
var _236=cls.prototype;
var _237=_236.__properties__||{};
_236.__properties__=object.extend({},_237);
if(base!==type){
for(var _238 in base){
if(_238.indexOf("__")!=0&&cls[_238]===undefined){
cls[_238]=base[_238];
}
}
}
cls.set("__base__",base);
cls.set("__this__",{parent:function(){
var name=arguments.callee.caller.__name__;
return cls.__base__.get(name).apply(cls.__base__,arguments);
}});
cls.__new__=base.__new__;
cls.__metaclass__=base.__metaclass__;
cls.set(dict);
var _23a=cls.__mixins__;
if(_23a){
_23a.forEach(function(_23b){
Class.keys(_23b).forEach(function(name){
if(cls.get(name)){
return;
}
var _23d=_23b.prototype[name];
if(typeof _23d=="function"&&_23d.__class__===_21d){
cls.set(name,_23d.im_func);
}else{
cls.set(name,_23d);
}
});
});
}
delete cls.__constructing__;
cls.__dict__=dict;
cls.prototype.get=_210;
cls.prototype.set=_213;
cls.prototype._set=_227;
return cls;
};
type.initialize=function(){
};
var _23e=this.Class=function(){
var _23f=arguments.length;
if(_23f<1){
throw new Error("bad arguments");
}
var base=_23f>1?arguments[0]:type;
if(base){
if(!_22b){
if(base===Array){
base=_22e;
}else{
if(base===String){
base=_22f;
}
}
}
}
var dict=arguments[_23f-1];
if(dict instanceof Function){
var f=dict;
dict={};
f.call(dict);
}
var _243;
if(dict.__metaclass__){
_243=dict.__metaclass__;
}else{
if(base.__metaclass__){
_243=base.__metaclass__;
}else{
_243=type;
}
}
var cls=_243.__new__(_243,null,base,dict);
_243.initialize(cls,null,base,dict);
return cls;
};
_23e.create=function(){
var cls=function(){
if(cls.__prototyping__){
return this;
}
this.__class__=cls;
_23e.initMixins(cls,this);
var _246=this.initialize?this.initialize.apply(this,arguments):null;
return _246;
};
cls.__subclassesarray__=[];
cls.__subclasses__=_22a;
cls.__mixin__=cls.set=_21e;
cls.get=_217;
return cls;
};
_23e.initMixins=function(cls,_248){
var _249;
if(cls.__mixins__){
for(var i=0,l=cls.__mixins__.length;i<l;i++){
_249=cls.__mixins__[i];
if(_249.prototype.initialize){
_249.prototype.initialize.call(_248);
}
}
}
};
_23e.mixin=function(dict,cls){
if(!dict.__mixins__){
dict.__mixins__=[];
}
dict.__mixins__.push(cls);
};
_23e.hasProperty=function(obj,name){
return (name in obj.__properties__);
};
_23e.getPropertyNames=function(obj){
return Object.keys(obj.__properties__);
};
_23e.inject=function(cls,host,args){
if(!args){
args=[];
}
host.__class__=cls;
host.__properties__=cls.prototype.__properties__;
var p=_23e.getInstance(cls);
object.extend(host,p);
_23e.initMixins(cls,host);
if(cls.prototype.initialize){
cls.prototype.initialize.apply(host,args);
}
};
_23e.getChain=function(cls){
var _256=[cls];
while(cls.__base__){
_256.push(cls.__base__);
cls=cls.__base__;
}
return _256;
};
_23e.getInstance=function(cls){
if(cls===Array||cls===String){
return new cls;
}
cls.__prototyping__=true;
var _258=new cls();
delete cls.__prototyping__;
return _258;
};
_23e.getAllSubClasses=function(cls,_25a){
if(!_25a){
_25a=[];
}else{
_25a.push(cls);
}
var subs=cls.__subclassesarray__;
for(var i=0,l=subs.length;i<l;i++){
arguments.callee(subs[i],_25a);
}
return _25a;
};
_23e.keys=function(cls){
keys=Object.keys(cls.prototype.__properties__);
keys=keys.concat(Object.keys(cls.prototype).filter(function(name){
return !(["get","set","_set","initialize","constructor"].indexOf(name)!==-1||name.indexOf("__")==0);
}));
return keys;
};
var _21d=function(func,cls){
var _262=cls?function(){
return cls.prototype[func.__name__].im_func.apply(cls.__this__,arguments);
}:function(){
var args=[].slice.call(arguments,0);
args.unshift(this);
return func.apply(this.__this__,args);
};
_262.__class__=arguments.callee;
_262.im_func=func;
return _262;
};
var _264=this.staticmethod=function(func){
var _266=function(){
};
_266.__class__=arguments.callee;
_266.im_func=func;
return _266;
};
var _267=this.classmethod=function(func){
var _269=function(){
var args=[].slice.call(arguments,0);
var cls;
if(this.__this__){
args.unshift(this);
return this.prototype[func.__name__].im_func.apply(this.__this__,args);
}else{
cls=this.__class__;
args.unshift(cls);
return func.apply(cls.__this__,args);
}
};
_269.__class__=arguments.callee;
_269.im_func=func;
return _269;
};
var _26c=this.property=function(fget,fset){
var p={};
p.__class__=arguments.callee;
p.fget=fget;
p.fset=fset;
return p;
};
var _270=function(_271,_272){
var cls=new _23e(function(){
for(var i=0,l=_272.length;i<l;i++){
this[_272[i]]=(function(name){
return function(){
return _271.prototype[name].apply(arguments[0],[].slice.call(arguments,1));
};
})(_272[i]);
}
});
return cls;
};
_22e=_270(Array,["concat","indexOf","join","lastIndexOf","pop","push","reverse","shift","slice","sort","splice","toString","unshift","valueOf","forEach","some","every","map","filter","reduce","reduceRight"]);
_22e.prototype.length=0;
_22f=_270(String,["charAt","charCodeAt","concat","indexOf","lastIndexOf","match","replace","search","slice","split","substr","substring","toLowerCase","toUpperCase","valueOf"]);
})();
(function(){
this.Loader=new Class(function(){
var _lib;
function Module(name){
this.__name__=name;
}
Module.prototype.toString=function(){
return "<module '"+this.__name__+"'>";
};
function NoModuleError(name){
this.message="no module named "+name;
}
NoModuleError.prototype=new Error();
this.scripts=document.getElementsByTagName("script");
this.initialize=function(self){
self.useCache=true;
self.lib={};
self.anonymousModuleCount=0;
_lib=self.lib;
self.add("sys",function(_27b){
});
};
this.loadLib=function(self){
var _27d=self.scripts;
for(var i=0,_27f,_280,l=_27d.length;i<l;i++){
_27f=_27d[i];
_280=_27f.getAttribute("data-module");
if(!_280){
continue;
}
if(_lib[_280]){
continue;
}
self.makePrefixPackage(_280);
_lib[_280]={file:_27f.getAttribute("data-src"),name:_280};
}
};
this.makePrefixPackage=function(self,name){
var _284=name.split(".");
for(var i=0,_286,l=_284.length-1;i<l;i++){
_286=_284.slice(0,i+1).join(".");
if(_lib[_286]==undefined){
_lib[_286]={name:_286};
}
}
};
this.loadScript=classmethod(function(cls,src,_28a,_28b){
_28b=!!_28b;
var ele;
if(_28b){
var _28d=cls.scripts;
for(var i=0,_28f,l=_28d.length;i<l;i++){
_28f=_28d[i];
if(_28f.src==src){
ele=_28f;
if(_28d[i].loading){
ele.callbacks.push(_28a);
}else{
_28a(ele);
}
return;
}
}
}
ele=document.createElement("script");
ele.type="text/javascript";
ele.src=src;
ele.async=true;
ele.loading=true;
ele.callbacks=[];
var _291=function(){
ele.loading=null;
ele.callbacks.forEach(function(_292){
_292(ele);
});
ele.callbacks=null;
};
ele.callbacks.push(_28a);
if(window.ActiveXObject){
ele.onreadystatechange=function(){
var rs=this.readyState;
if("loaded"===rs||"complete"===rs){
ele.onreadystatechange=null;
_291();
}
};
}else{
if(ele.addEventListener){
ele.addEventListener("load",_291,false);
ele.addEventListener("error",_291,false);
}else{
ele.onload=ele.onerror=_291;
}
}
document.getElementsByTagName("head")[0].insertBefore(ele,null);
});
this.executeModule=function(self,pkg,_296,_297,_298,_299){
if(!_299){
_299={};
}
var _29a=new Module(_299.name||pkg.name);
if(_29a.__name__==="sys"){
_29a.modules=_296;
}
var args=[_29a];
var done=function(){
if(pkg.fn){
var _29d=pkg.fn.apply(_29a,args);
if(_29d){
if(typeof _29d==="object"||typeof _29d==="function"){
_29d.toString=Module.prototype.toString;
_29d.__name__=_29a.__name__;
}
_29a=_29d;
}
}
if(_298){
_298(_29a);
}
};
if(!pkg.fn&&pkg.file){
self.loadScript(pkg.file,function(){
loadNext(0);
},true);
return;
}else{
if(!pkg.fn||pkg.uses.length===0){
done();
return;
}
}
function loadNext(i){
var use=pkg.uses[i];
_297.push(use);
if(_297.indexOf(use)!=_297.length-1){
var _2a0=new Error("circular dependencies. ["+_297.join(",")+"]");
_2a0.stack=_297;
throw _2a0;
}
self.getModule(use,_296,_297,function(){
_297.pop();
var _2a1,root,_2a3;
_2a1=use.split(".");
root=_296[_2a1[0]];
if(args.indexOf(root)==-1){
args.push(root);
}
if(i<pkg.uses.length-1){
loadNext(i+1);
}else{
if(i==pkg.uses.length-1){
done();
}
}
});
}
loadNext(0);
};
this.getModule=function(self,name,_2a6,_2a7,_2a8){
var _2a9=name.split(".");
function loadNext(i,_2ab){
var _2ac=_2a9.slice(0,i+1).join(".");
name=_2a9[i];
var next=function(_2ae){
_2a6[_2ac]=_2ae;
if(_2ab){
_2a6[_2ab][name]=_2a6[_2ac];
}
if(i<_2a9.length-1){
loadNext(i+1,_2ac);
}else{
if(i==_2a9.length-1){
_2a8(_2a6[_2ac]);
}
}
};
if(_2a6[_2ac]){
next(_2a6[_2ac]);
}else{
if(_lib[_2ac]){
var pkg=_lib[_2ac];
if(pkg.file){
self.loadScript(pkg.file,function(){
self.executeModule(pkg,_2a6,_2a7,next);
},true);
}else{
self.executeModule(pkg,_2a6,_2a7,next);
}
}else{
throw new NoModuleError(_2ac);
}
}
}
loadNext(0);
};
this.getUses=function(self,uses,_2b2){
if(typeof uses=="string"){
uses=uses.split(/\s*,\s*/ig);
}
uses=uses.filter(function(use){
return use!=_2b2;
});
return uses;
};
this.add=function(self,name,uses,_2b7){
if(_lib[name]&&_lib[name].fn){
return null;
}
if(typeof uses=="function"){
_2b7=uses;
uses=[];
}else{
uses=self.getUses(uses,name);
}
self.makePrefixPackage(name);
var pkg=_lib[name];
if(!pkg){
pkg=_lib[name]={};
}
pkg.name=name;
pkg.uses=uses;
pkg.fn=_2b7;
return pkg;
};
this.use=function(self,uses,_2bb){
self.loadLib();
var name="__anonymous_"+self.anonymousModuleCount+"__";
self.anonymousModuleCount++;
var _2bd=self.add(name,uses,_2bb);
self.executeModule(_2bd,{},[],function(_2be){
for(var _2bf in _2be){
if(_2bf!="__name__"&&window[_2bf]===undefined){
window[_2bf]=_2be[_2bf];
}
}
},{name:"__main__"});
};
this.execute=function(self,name){
self.loadLib();
var _2c2=_lib[name];
if(!_2c2){
throw new NoModuleError(name);
}
self.executeModule(_2c2,{},[],null,{name:"__main__"});
};
});
})();
object.add("ua",function(_2c3){
var _2c4=this.numberify=function(s){
var c=0;
return parseFloat(s.replace(/\./g,function(){
return (c++===0)?".":"";
}));
};
var o=this.ua={};
var ua=navigator.userAgent,m,m2;
var core,_2cc;
if((m=ua.match(/MSIE\s([^;]*)/))&&m[1]){
if((m2=ua.match(/Trident\/([\d.]*)/))&&m2[1]){
o[core="ie"]=document.documentMode;
o[_2cc="ieshell"]=_2c4(m2[1])+4;
}else{
o[_2cc="ieshell"]=o[core="ie"]=_2c4(m[1]);
}
}else{
if((m=ua.match(/AppleWebKit\/([\d.]*)/))&&m[1]){
o[core="webkit"]=_2c4(m[1]);
}else{
if((m=ua.match(/Gecko/))){
o[core="gecko"]=0;
if((m=ua.match(/rv:([\d.]*)/))&&m[1]){
o[core]=_2c4(m[1]);
}
}else{
if((m=ua.match(/Presto\/([\d.]*)/))&&m[1]){
o[core="presto"]=_2c4(m[1]);
}
}
}
if((m=ua.match(/Chrome\/([\d.]*)/))&&m[1]){
o[_2cc="chrome"]=_2c4(m[1]);
}else{
if((m=ua.match(/\/([\d.]*) Safari/))&&m[1]){
o[_2cc="safari"]=_2c4(m[1]);
}else{
if((m=ua.match(/Firefox\/([\d.]*)/))&&m[1]){
o[_2cc="firefox"]=_2c4(m[1]);
}else{
if((m=ua.match(/Opera\/([\d.]*)/))&&m[1]){
o[_2cc="opera"]=_2c4(m[1]);
if((m=ua.match(/Opera\/.* Version\/([\d.]*)/))&&m[1]){
o[_2cc]=_2c4(m[1]);
}
}
}
}
}
}
o.shell=_2cc;
o.core=core;
});
object.add("string",function(_2cd){
this.substitute=function(){
return Mustache.to_html.apply(null,arguments);
};
this.camelCase=function(str){
return str.replace(/-\D/g,function(_2cf){
return _2cf.charAt(1).toUpperCase();
});
};
this.hyphenate=function(str){
return str.replace(/[A-Z]/g,function(_2d1){
return ("-"+_2d1.charAt(0).toLowerCase());
});
};
this.capitalize=function(str){
return str.replace(/\b[a-z]/g,function(_2d3){
return _2d3.toUpperCase();
});
};
this.trim=function(str){
return (str||"").replace(/^\s+|\s+$/g,"");
};
this.ltrim=function(str){
return (str||"").replace(/^\s+/,"");
};
this.rtrim=function(str){
return (str||"").replace(/\s+$/,"");
};
this.lengthZh=function(str){
return str.length;
};
this.toQueryString=function(_2d8){
var _2d9=[];
for(var key in _2d8){
var _2db=_2d8[key];
var _2dc;
if(_2db&&_2db.constructor===Array){
var qs={};
_2db.forEach(function(val,i){
qs[i]=val;
});
_2dc=arguments.callee(qs,key);
}else{
if(typeof _2db=="object"){
_2dc=arguments.callee(_2db,key);
}else{
_2dc=key+"="+encodeURIComponent(_2db);
}
}
if(_2db!==null){
_2d9.push(_2dc);
}
}
return _2d9.join("&");
};
});
object.add("events","ua",function(_2e0,ua){
function IEEvent(){
}
IEEvent.prototype.stopPropagation=function(){
this.cancelBubble=true;
};
IEEvent.prototype.preventDefault=function(){
this.returnValue=false;
};
IEEvent.prototype.getPreventDefault=function(){
return this.returnValue===false;
};
IEEvent.prototype.stop=function(){
this.stopPropagation();
this.preventDefault();
};
this.fireevent=function(arg1){
var name,func,_2e5;
var _2e6=function(self){
var _2e8=Function.__get_name__(arguments.callee)||arguments.callee.__name__;
if(!name){
name=_2e8;
}
var _2e9={};
var args=Array.prototype.slice.call(arguments,1);
if(_2e5){
for(var i=0;i<_2e5.length;i++){
_2e9[_2e5[i]]=arguments[i+1];
}
}
_2e9._args=args;
var _2ec=self.fireEvent(name,_2e9,self);
var _2ed=self[_2e8+"_createEvent"];
if(_2ed){
args.unshift(_2ec);
_2ed.apply(self,args);
}
var _2ee=_2ec.getPreventDefault?_2ec.getPreventDefault():_2ec.defaultPrevented;
if(!_2ee){
func.apply(this,arguments);
}
return _2ec;
};
if(typeof arg1=="function"){
func=arg1;
return _2e6;
}else{
if(Array.isArray(arguments[0])){
_2e5=arguments[0];
}else{
name=arg1;
if(arguments[1]){
_2e5=arguments[1];
}
}
return function(_2ef){
func=_2ef;
return _2e6;
};
}
};
this.wrapEvent=function(e){
e.target=e.srcElement;
e.stopPropagation=IEEvent.prototype.stopPropagation;
e.preventDefault=IEEvent.prototype.preventDefault;
e.getPreventDefault=IEEvent.prototype.getPreventDefault;
e.stop=IEEvent.prototype.stop;
return e;
};
this.Events=new Class(function(){
this.__addEvent=function(self,type,func,cap){
var _2f5="_event_"+type;
if(self[_2f5]===undefined){
self[_2f5]=0;
}
self.attachEvent("onpropertychange",function(_2f6){
if(_2f6.propertyName==_2f5){
func();
}
});
};
this.initialize=function(self){
if(!self.addEventListener){
self._eventListeners={};
}
if(!self.addEventListener&&!self.attachEvent){
self.__boss=document.createElement("div");
}
};
this.addEvent=document.addEventListener?function(self,type,func,cap){
var boss=self.__boss||self;
if(cap===null){
cap=false;
}
if(!ua.ua.ie&&type=="mouseleave"){
var _2fd=function(_2fe,_2ff){
var p=_2fe.relatedTarget;
while(p&&p!=_2ff){
try{
p=p.parentNode;
}
catch(error){
p=_2ff;
}
}
return p!==_2ff;
};
var _301=func;
func=function(_302){
var p=_302.relatedTarget;
while(p&&p!=self){
try{
p=p.parentNode;
}
catch(e){
p=self;
}
}
if(p!==self&&_301){
_301.call(self,_302);
}
};
func.innerFunc=_301;
type="mouseout";
}
boss.addEventListener(type,func,cap);
}:function(self,type,func){
var boss=self.__boss||self;
if(!self._eventListeners[type]){
self._eventListeners[type]=[];
}
var _308=self._eventListeners[type];
if(_308.some(function(f){
return f.innerFunc===func;
})){
return;
}
var _30a=function(_30b){
var e=arguments.length>1?_30b:_2e0.wrapEvent(window.event);
func.call(self,e);
};
_30a.innerFunc=func;
_308.push(_30a);
boss.attachEvent("on"+type,_30a);
};
this.removeEvent=document.removeEventListener?function(self,type,func,cap){
var boss=self.__boss||self;
boss.removeEventListener(type,func,cap);
}:function(self,type,func,cap){
var boss=self.__boss||self;
if(!self._eventListeners){
self._eventListeners={};
}
var _317=self._eventListeners[type];
if(!_317){
return;
}
for(var i=0,_319;i<_317.length;i++){
_319=_317[i];
if(_319===func||_319.innerFunc===func){
_317.splice(i,1);
break;
}
}
if(_319){
boss.detachEvent("on"+type,_319);
}
};
this.fireEvent=document.dispatchEvent?function(self,type,_31c){
var boss=self.__boss||self;
var _31e="on"+type.toLowerCase();
var _31f=document.createEvent("Event");
_31f.initEvent(type,false,true);
object.extend(_31f,_31c);
if(self[_31e]){
var _320=self[_31e].call(self,_31f);
if(_320===false){
_31f.preventDefault();
}
}
boss.dispatchEvent(_31f);
return _31f;
}:function(self,type,_323){
if(!_323){
_323={};
}
var _324="on"+type.toLowerCase();
var _325=_2e0.wrapEvent(_323);
if(self[_324]){
var _326=self[_324].call(self,_325);
if(_326===false){
_325.preventDefault();
}
}
if(!self._eventListeners[type]){
return _325;
}
var _327=self._eventListeners[type];
for(var i=0,j=_327.length;i<j;i++){
if(_327[i]){
_327[i].call(self,_325,true);
}
}
return _325;
};
});
});
object.add("options",function(_32a){
var _32b=true;
for(var i in {toString:1}){
_32b=null;
}
if(_32b){
_32b=["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"];
}
this.overloadsetter=function(func){
return function(){
var a=arguments[func.length-2]||null;
var b=arguments[func.length-1];
var _330=args=Array.prototype.slice.call(arguments,0,func.length-2);
if(a===null){
return this;
}
if(typeof a!="string"){
for(var k in a){
args=_330.slice(0);
args.push(k);
args.push(a[k]);
func.apply(this,args);
}
if(_32b){
for(var i=_32b.length;i>0;i--){
k=_32b[i];
if(a.hasOwnProperty(k)){
func.call(this,k,a[k]);
}
}
}
}else{
args.push(a);
args.push(b);
func.apply(this,args);
}
return this;
};
};
this.Arguments=new Class(function(){
this.initialize=function(self,_334,opts){
if(opts==undefined){
opts={};
}
var _336={};
for(var key in _334){
_336[key]=(opts[key]!=undefined?opts[key]:_334[key]);
}
return _336;
};
});
this.Options=new Class({initialize:function(self,_339){
if(_339){
self._provider=_339;
}
self._options={};
},setOptions:function(self,_33b,host){
if(!host){
host=self._options;
}
for(var i in _33b){
if(host[i]!==undefined){
host[i]=_33b[i];
}
}
},setOption:function(self,name,type,_341){
if(_341!==undefined){
self._options[name]=_341;
}else{
_341=self._provider.makeOption(name,type);
if(_341===null){
return;
}else{
self._options[name]=_341;
}
}
},getOptions:function(self){
return self._options;
}});
});
object.add("dom","ua, events, string, sys",function(_343,ua,_345,_346,sys){
window.UID=1;
var _348={};
var get=function(uid){
return (_348[uid]||(_348[uid]={}));
};
var $uid=this.$uid=(window.ActiveXObject)?function(item){
return (item.uid||(item.uid=[window.UID++]))[0];
}:function(item){
return item.uid||(item.uid=window.UID++);
};
$uid(window);
$uid(document);
if(!window.__domloadHooks){
window.__domLoaded=false;
window.__domloadHooks=[];
if(document.addEventListener){
document.addEventListener("DOMContentLoaded",function(){
document.removeEventListener("DOMContentLoaded",arguments.callee,false);
window.__domLoaded=true;
},false);
}
var _34e=null;
if(ua.ua.webkit&&ua.ua.webkit<525){
_34e=setInterval(function(){
if(/loaded|complete/.test(document.readyState)){
clearInterval(_34e);
window.__domLoaded=true;
runHooks();
}
},10);
}else{
if(ua.ua.ie){
_34e=setInterval(function(){
try{
document.body.doScroll("left");
clearInterval(_34e);
window.__domLoaded=true;
runHooks();
}
catch(e){
}
},20);
}
}
}
function runHooks(){
var _34f=window.__domloadHooks;
var fn;
while(_34f[0]){
try{
fn=_34f.shift();
fn();
}
catch(e){
if(XN&&XN.DEBUG_MODE){
throw e;
}
}
}
}
this.ready=function(_351){
if(window.__domLoaded==true){
_351();
return;
}
if(document.readyState=="complete"){
window.__domLoaded=true;
runHooks();
_351();
return;
}
if((ua.ua.webkit&&ua.ua.webkit<525)||!document.addEventListener){
window.__domloadHooks.push(_351);
}else{
if(document.addEventListener){
document.addEventListener("DOMContentLoaded",_351,false);
}
}
};
var wrap=this.wrap=function(node){
if(!node){
return null;
}
if(Array.isArray(node)){
return new _354(node);
}else{
if(node._wrapped){
return node;
}
var _355;
if(node===window){
_355=_356;
}else{
if(node===window.document){
_355=_357;
}else{
if(node.nodeType===1){
_355=getWrapper(node.tagName);
}else{
return node;
}
}
}
node._wrapped=true;
$uid(node);
Class.inject(_355,node);
return node;
}
};
var _358=this.getElements=function(_359,_35a){
if(!_35a){
_35a=document;
}
var _35b=Slick.parse(_359);
var eles=Sizzle(_359,_35a);
var _35d,part;
if(_35b.expressions.length==1){
part=_35b.expressions[0];
_35d=getWrapper(part[part.length-1].tag);
}else{
for(var i=0,_360,_361;i<_35b.expressions.length;i++){
part=_35b.expressions[i];
_35d=getWrapper(part[part.length-1].tag);
_360=Class.getChain(_35d).slice(0,-1).reverse();
if(_361){
_360=getCommon(_360,_361);
}
if(_360.length==1){
break;
}
_361=_360;
}
_35d=_360[_360.length-1];
}
return new _354(eles,_35d);
};
var _362=this.getElement=function(_363,_364){
if(!_364){
_364=document;
}
var ele=Sizzle(_363,_364)[0];
ele=wrap(ele);
return ele;
};
this.id=function(id){
return _343.wrap(document.getElementById(id));
};
var _367=this.eval_inner_JS=function(ele){
var js=[];
if(ele.nodeType==11){
for(var i=0;i<ele.childNodes.length;i++){
if(ele.childNodes[i].nodeType===1){
js=js.concat(ele.childNodes[i].getElementsByTagName("script"));
}
}
}else{
if(ele.nodeType==1){
js=ele.getElementsByTagName("script");
}
}
var arr=[];
for(i=0;i<js.length;i++){
arr.push(js[i]);
}
arr.forEach(function(s,i){
if(s.src){
return;
}else{
var _36e="__inner_js_out_put = [];\n";
_36e+=s.innerHTML.replace(/document\.write/g,"__inner_js_out_put.push");
eval(_36e);
if(__inner_js_out_put.length!==0){
var tmp=document.createDocumentFragment();
$(tmp).appendHTML(__inner_js_out_put.join(""));
s.parentNode.insertBefore(tmp,s);
}
}
});
};
var _370=(function(){
var t=document.createElement("div");
t.innerHTML="<TEST_TAG></TEST_TAG>";
return (t.firstChild===null);
})();
this.getDom=function(str){
var tmp=document.createElement("div");
var _374=document.createDocumentFragment();
if(_370){
tmp.style.display="none";
document.body.appendChild(tmp);
}
tmp.innerHTML=str;
while(tmp.firstChild){
_374.appendChild(wrap(tmp.firstChild));
}
if(_370){
tmp.parentNode.removeChild(tmp);
}
return _374;
};
var _375=this.ElementClassList=new Class(Array,function(){
this.initialize=function(self,ele){
self.length=0;
self._ele=ele;
self._loadClasses();
};
this._loadClasses=function(self){
self._classes=self._ele.className.replace(/^\s+|\s+$/g,"").split(/\s+/);
};
this.toggle=function(self,_37a){
if(self.contains(_37a)){
self.remove(_37a);
}else{
self.add(_37a);
}
};
this.add=function(self,_37c){
if(!self.contains(_37c)){
self._ele.className+=(" "+_37c);
}
};
this.remove=function(self,_37e){
self._ele.className=self._ele.className.replace(new RegExp(_37e,"i"),"");
};
this.contains=function(self,_380){
self._loadClasses();
if(self._classes.indexOf(_380)!=-1){
return true;
}else{
return false;
}
};
this.item=function(self,i){
return self._classes[i]||null;
};
this.toString=function(self){
return self._ele.className;
};
});
var _384=this.Element=new Class(function(){
Class.mixin(this,_345.Events);
this.initialize=function(self,_386){
if(_386){
self=document.createElement(_386);
wrap(self);
}else{
}
self._eventListeners={};
if(self.classList===undefined&&self!==document&&self!==window){
self.classList=new _375(self);
}
};
this.retrieve=function(self,_388,dflt){
var _38a=get(self.uid),prop=_38a[_388];
if(dflt!==null&&prop===null){
prop=_38a[_388]=dflt;
}
return prop!==null?prop:null;
};
this.store=function(self,_38d,_38e){
var _38f=get(self.uid);
_38f[_38d]=_38e;
return self;
};
this.delegate=function(self,_391,type,_393){
self.addEvent(type,function(e){
var ele=e.srcElement||e.target;
do{
if(ele&&_384.get("matchesSelector")(ele,_391)){
_393.call(wrap(ele),e);
}
}while((ele=ele.parentNode));
});
};
this.matchesSelector=function(self,_397){
return Sizzle.matches(_397,[self]).length>0;
};
this.getData=function(self,name){
return self.getAttribute("data-"+name);
};
this.setHTML=function(self,str){
self.set("innerHTML",str);
};
this.setContent=this.setHTML;
this.getElement=function(self,_39d){
return _362(_39d,self);
};
this.getElements=function(self,_39f){
return _358(_39f,self);
};
var _3a0={before:function(_3a1,_3a2){
var _3a3=_3a2.parentNode;
if(_3a3){
_3a3.insertBefore(_3a1,_3a2);
}
},after:function(_3a4,_3a5){
var _3a6=_3a5.parentNode;
if(_3a6){
_3a6.insertBefore(_3a4,_3a5.nextSibling);
}
},bottom:function(_3a7,_3a8){
_3a8.appendChild(_3a7);
},top:function(_3a9,_3aa){
_3aa.insertBefore(_3a9,_3aa.firstChild);
}};
_3a0.inside=_3a0.bottom;
this.grab=function(self,el,_3ad){
_3a0[_3ad||"bottom"](el,self);
return self;
};
this.inject=function(self,el,_3b0){
_3a0[_3b0||"bottom"](self,el);
return self;
};
this.getPrevious=function(self){
};
this.getAllPrevious=function(self){
};
this.getNext=function(self){
};
this.getAllNext=function(self){
};
this.getFirst=function(self){
};
this.getLast=function(self){
};
this.getParent=function(self,_3b8){
if(!_3b8){
return wrap(self.parentNode);
}
var _3b9=self;
do{
if(_384.get("matchesSelector")(_3b9,_3b8)){
return wrap(_3b9);
}
}while((_3b9=_3b9.parentNode));
return null;
};
this.getParents=function(self){
};
this.getSiblings=function(self){
};
this.getChildren=function(self){
};
this.addClass=function(self,name){
self.classList.add(name);
};
this.removeClass=function(self,name){
self.classList.remove(name);
};
this.toggleClass=function(self,name){
self.classList.toggle(name);
};
this.hasClass=function(self,name){
return self.classList.contains(name);
};
this.setStyle=function(self,_3c6,_3c7){
switch(_3c6){
case "opacity":
return self.set("opacity",parseFloat(_3c7));
case "float":
_3c6=floatName;
break;
default:
break;
}
_3c6=_346.camelCase(_3c6);
self.style[_3c6]=_3c7;
return null;
};
this.dispose=function(self){
return (self.parentNode)?self.parentNode.removeChild(self):self;
};
this.hide=function(self){
if(self.style.display!=="none"){
self.oldDisplay=self.style.display;
}
self.style.display="none";
};
this.show=function(self){
self.style.display=self.oldDisplay||"";
};
this.toggle=function(self){
if(self.style.display=="none"){
self.show();
}else{
self.hide();
}
};
this.innerHTML=property(null,function(self,html){
if(_370){
var _3ce=_343.getDom(html);
self.innerHTML="";
while(_3ce.firstChild){
self.appendChild(_3ce.firstChild);
}
}else{
self.innerHTML=html;
}
});
this.tagName=property(function(self){
return self.tagName.toUpperCase();
});
this.fromString=staticmethod(function(str){
var tmp=document.createElement("div");
if(_370){
tmp.style.display="none";
document.body.appendChild(tmp);
}
tmp.innerHTML=str.trim();
var _3d2=wrap(tmp.firstChild);
if(_370){
tmp.parentNode.removeChild(tmp);
}
return _3d2;
});
});
this.ImageElement=new Class(_384,function(){
var _3d3="naturalWidth" in document.createElement("img");
function _getNaturalSize(img){
var _3d5=img.runtimeStyle;
var old={w:_3d5.width,h:_3d5.height};
_3d5.width=_3d5.height="auto";
var w=img.width;
var h=img.height;
_3d5.width=old.w;
_3d5.height=old.h;
return {width:w,height:h};
}
this.naturalWidth=property(function(self){
if(_3d3){
return self.naturalWidth;
}else{
return _getNaturalSize(self).width;
}
});
this.naturalHeight=property(function(self){
if(_3d3){
return self.naturalHeight;
}else{
return _getNaturalSize(self).height;
}
});
});
this.FormElement=new Class(_384,function(){
this.initialize=function(self){
this.parent(self);
if(self.elements){
for(var i=0;i<self.elements.length;i++){
wrap(self.elements[i]);
}
}
};
this.send=function(self,_3de){
if(!_3de){
_3de=self.toQueryString();
}
var net=sys.modules["net"];
if(net){
xhr=new net.Request({onsuccess:function(_3e0){
self.fireEvent("requestSuccess",{request:_3e0.request});
},onerror:function(_3e1){
self.fireEvent("requestError",{request:_3e1.request});
}});
}else{
throw new ModuleRequiredError("net");
}
xhr.method=self.method;
xhr.url=self.action;
xhr.send(_3de);
};
this.toQueryString=function(self){
var _3e3=[];
function addItem(name,_3e5){
if(typeof _3e5!="undefined"){
_3e3.push(encodeURIComponent(name)+"="+encodeURIComponent(_3e5));
}
}
self.getElements("input, select, textarea, output").forEach(function(el){
var type=el.type;
if(!el.name||el.disabled||type=="submit"||type=="reset"||type=="file"||type=="image"){
return;
}
if(el.tagName.toLowerCase()=="select"){
el.getSelected().map(function(opt){
var _3e9=wrap(opt).get("value");
addItem(el.name,_3e9);
});
}else{
if(type=="radio"||type=="checkbox"){
if(el.checked){
addItem(el.name,el.get("value"));
}
}else{
addItem(el.name,el.get("value"));
}
}
});
return _3e3.join("&");
};
this.checkValidity=function(self){
return self.getElements("input, select, textarea, output").every(function(el){
return el.checkValidity();
});
};
});
this.FormItemElement=new Class(_384,function(){
var _3ec=(function(){
return !("placeholder" in document.createElement("input"));
})();
var _3ed=(function(){
return ("checkValidity" in document.createElement("input"));
})();
this.initialize=function(self){
this.parent(self);
if(_3ec&&["INPUT","TEXTAREA"].indexOf(self.get("tagName"))!==-1){
self.bindPlaceholder(self);
}
};
this.selectionStart=property(function(self){
if(typeof self.selectionStart=="number"){
return self.selectionStart;
}else{
if(document.selection){
self.focus();
var _3f0=document.selection.createRange();
var _3f1=0;
if(_3f0.parentElement()==self){
var _3f2=document.body.createTextRange();
_3f2.moveToElementText(self);
for(_3f1=0;_3f2.compareEndPoints("StartToStart",_3f0)<0;_3f1++){
_3f2.moveStart("character",1);
}
for(var i=0;i<=_3f1;i++){
if(self.get("value").charAt(i)=="\n"){
_3f1++;
}
}
}
return _3f1;
}
}
});
this.selectionEnd=property(function(self){
if(typeof self.selectionEnd=="number"){
return self.selectionEnd;
}else{
if(document.selection){
self.focus();
var _3f5=document.selection.createRange();
var end=0;
if(_3f5.parentElement()==self){
var _3f7=document.body.createTextRange();
_3f7.moveToElementText(self);
for(end=0;_3f7.compareEndPoints("StartToEnd",_3f5)<0;end++){
_3f7.moveStart("character",1);
}
for(var i=0;i<=end;i++){
if(self.get("value").charAt(i)=="\n"){
end++;
}
}
}
return end;
}
}
});
this.getSelected=function(self){
self.selectedIndex;
var _3fa=[];
for(var i=0;i<self.options.length;i++){
if(self.options[i].selected){
_3fa.push(self.options[i]);
}
}
return _3fa;
};
this.value=property(function(self){
if(self.classList.contains("placeholder")){
return "";
}
return self.value;
},function(self,_3fe){
if(self.classList.contains("placeholder")){
self.classList.remove("placeholder");
self.removeAttribute("autocomplete");
self.value="";
}
self.value=_3fe;
if(_3ec&&!self.value&&self.getAttribute("placeholder")){
self.classList.add("placeholder");
self.value=self.getAttribute("placeholder");
self.setAttribute("autocomplete","off");
}
self.checkValidity();
});
if(!_3ed){
this.validity=property(function(self){
var _400=self.get("value");
var _401={valueMissing:self.getAttribute("required")&&!_400?true:false,typeMismatch:(function(type){
if(type=="url"){
return !(/^\s*(?:(\w+?)\:\/\/([\w-_.]+(?::\d+)?))(.*?)?(?:;(.*?))?(?:\?(.*?))?(?:\#(\w*))?$/i).test(_400);
}
if(type=="tel"){
return !(/[^\r\n]/i).test(_400);
}
if(type=="email"){
return !(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/i).test(_400);
}
return false;
})(self.getAttribute("type")),patternMismatch:(function(){
var _403=self.getAttribute("pattern");
if(_403){
return !(new RegExp("^"+_403+"$")).test(_400);
}else{
return false;
}
})(),tooLong:(function(){
var _404=self.getAttribute("maxlength");
var n=Number(_404);
if(n!=_404){
return false;
}
return _400.length>n;
})(),customError:!!self.__customValidity,rangeUnderflow:false,rangeOverflow:false,stepMismatch:false};
_401.valid=["valueMissing","typeMismatch","patternMismatch","tooLong","rangeUnderflow","rangeOverflow","stepMismatch","customError"].every(function(name){
return _401[name]===false;
});
self.__validationMessage=(function(){
if(_401.valid){
return "";
}
if(_401.customError){
return self.__customValidity;
}
if(_401.valueMissing){
return "\u8bf7\u586b\u5199\u6b64\u5b57\u6bb5\u3002";
}
if(_401.typeMismatch){
return "\u8bf7\u8f93\u5165\u4e00\u4e2a"+self.getAttribute("type")+"\u3002";
}
if(_401.patternMismatch){
return "\u8bf7\u5339\u914d\u8981\u6c42\u7684\u683c\u5f0f\u3002";
}
if(_401.tooLong){
return "\u8bf7\u5c06\u8be5\u6587\u672c\u51cf\u5c11\u4e3a "+self.getAttribute("maxlength")+" \u4e2a\u5b57\u7b26\u6216\u66f4\u5c11\uff08\u60a8\u5f53\u524d\u4f7f\u7528\u4e86"+self.get("value").length+"\u4e2a\u5b57\u7b26\uff09\u3002";
}
if(_401.rangeUnderflow){
return "\u503c\u5fc5\u987b\u5927\u4e8e\u6216\u7b49\u4e8e"+self.getAttribute("min")+"\u3002";
}
if(_401.rangeOverflow){
return "\u503c\u5fc5\u987b\u5c0f\u4e8e\u6216\u7b49\u4e8e"+self.getAttribute("max")+"\u3002";
}
if(_401.stepMismatch){
return "\u503c\u65e0\u6548\u3002";
}
})();
self._set("validationMessage",self.__validationMessage);
self._set("validity",_401);
return _401;
});
this.validationMessage=property(function(self){
self.get("validity");
return self.__validationMessage;
});
this.setCustomValidity=function(self,_409){
self.__customValidity=_409;
self.get("validity");
};
this.checkValidity=function(self){
self.get("validity");
return self.validity.valid;
};
}else{
this.validity=property(function(self){
return self.validity;
});
this.validationMessage=property(function(self){
return self.validationMessage;
});
}
this.focusToPosition=function(self,_40e){
if(_40e===undefined){
_40e=self.get("value").length;
}
if(self.setSelectionRange){
self.focus();
self.setSelectionRange(self.get("value").length,_40e);
}else{
if(self.createTextRange){
var _40f=self.createTextRange();
_40f.moveStart("character",_40e);
_40f.collapse(true);
_40f.select();
self.focus();
}else{
self.focus();
}
}
};
this.bindPlaceholder=staticmethod(function(_410){
function checkEmpty(_411,_412){
var _413=_411.getAttribute("placeholder");
if(!_413){
return;
}
if(_411.classList.contains("placeholder")){
if(_412.type=="focus"&&_411.value===_413){
_411.value="";
}
_411.classList.remove("placeholder");
_411.removeAttribute("autocomplete");
}else{
if(!_411.value||((ua.ua.ie==6||ua.ua.ie==7)&&!_412&&_411.value==_413)){
_411.classList.add("placeholder");
_411.value=_413;
_411.setAttribute("autocomplete","off");
}
}
}
_410.addEvent("focus",function(_414){
return checkEmpty(_414.target,_414);
});
_410.addEvent("blur",function(_415){
return checkEmpty(_415.target,_415);
});
if(_410.form){
wrap(_410.form).addEvent("submit",function(){
if(_410.classList.contains("placeholder")){
_410.value="";
}
});
}
checkEmpty(_410);
});
});
var _356=this.Window=new Class(_384,function(){
});
var _357=this.Document=new Class(_384,function(){
});
var _354=this.Elements=new Class(Array,function(){
this.initialize=function(self,_417,_418){
if(!_418){
_418=_384;
}
for(var i=0;i<_417.length;i++){
self.push(wrap(_417[i]));
}
Class.keys(_418).forEach(function(name){
if(typeof _418.get(name)!="function"){
return;
}
self[name]=function(){
var _41b;
for(var i=0;i<self.length;i++){
_41b=self[i];
if(typeof _41b[name]=="function"){
_41b[name].apply(self[i],[].slice.call(arguments,0));
}
}
};
});
self.set=function(key,_41e){
for(var i=0;i<self.length;i++){
self[i].set(key,_41e);
}
};
self.get=function(key){
var _421=[];
for(var i=0;i<self.length;i++){
_421.push(self[i].get(key));
}
return _421;
};
};
});
var _423={"IMG":_343.ImageElement,"FORM":_343.FormElement,"INPUT":_343.FormItemElement,"TEXTAREA":_343.FormItemElement,"OUTPUT":_343.FormItemElement,"SELECT":_343.FormItemElement,"OPTION":_343.FormItemElement,"BUTTON":_343.FormItemElement};
function getWrapper(_424){
var tag=_424.toUpperCase();
var cls=_423[tag];
if(cls){
return cls;
}else{
return _384;
}
}
function getCommon(arr1,arr2){
var i;
for(i=0,l=arr1.length;i<l;i++){
if(!arr2[i]||arr2[i]!==arr1[i]){
break;
}
}
return arr1.slice(0,i);
}
});
object.add("net","dom, events",function(_42a,dom,_42c){
var _42d=this.ajaxProxies={};
this.ajaxRequest=function(url,_42f){
var tmpA=document.createElement("a");
tmpA.href=url;
var _431=tmpA.hostname;
if(_431&&(_431!=location.hostname)){
var xhr=null;
if(_42d[_431]){
_42f(_42d[_431].getTransport());
}else{
var _433=document.createElement("iframe");
_433.style.display="none";
dom.ready(function(){
document.body.insertBefore(_433,document.body.firstChild);
_433.src="http://"+_431+"/ajaxproxy.htm";
if(_433.attachEvent){
_433.attachEvent("onload",function(){
_42f(_433.contentWindow.getTransport());
_42d[_431]=_433.contentWindow;
});
}else{
_433.onload=function(){
_42f(_433.contentWindow.getTransport());
_42d[_431]=_433.contentWindow;
};
}
});
}
}else{
if(window.ActiveXObject){
try{
_42f(new ActiveXObject("Msxml2.XMLHTTP"));
}
catch(e){
_42f(new ActiveXObject("Microsoft.XMLHTTP"));
}
}else{
_42f(new XMLHttpRequest());
}
}
};
this.ping=function(url){
var n="_net_ping_"+(new Date()).getTime();
var c=window[n]=new Image();
c.onload=(c.onerror=function(){
window[n]=null;
});
c.src=url;
c=null;
};
this.Request=new Class(function(){
Class.mixin(this,_42c.Events);
this.initialize=function(self,_438){
self.url=_438.url||"";
self.method=_438.method||"get";
self.headers={};
self._xhr=null;
self.onSuccess=_438.onSuccess;
self.onsuccess=_438.onsuccess;
self.onerror=_438.onerror;
self.oncomplete=_438.oncomplete;
};
this.send=function(self,_43a){
_42a.ajaxRequest(self.url,function(xhr){
self._xhr=xhr;
var _43c={request:xhr};
xhr.onreadystatechange=function(){
var xhr=self._xhr;
if(xhr.readyState===4){
_43c.responseText=xhr.responseText;
_43c.responseXML=xhr.responseXML;
if(xhr.status===undefined||xhr.status===0||(xhr.status>=200&&xhr.status<300)){
self.fireEvent("success",_43c);
if(self.onSuccess){
self.onSuccess(_43c);
}
}else{
self.fireEvent("error",_43c);
}
self.fireEvent("complete",_43c);
}
};
var xhr=self._xhr;
var url=self.url;
if(_43a&&self.method=="get"){
url+=(url.indexOf("?")!=-1?"&":"?")+_43a;
_43a=null;
}
xhr.open(self.method,url,true);
xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
for(var name in self.headers){
xhr.setRequestHeader(name,self.headers[name]);
}
self._xhr.send(_43a);
});
};
this.setHeader=function(self,name,_442){
self.headers[name]=_442;
};
});
});
object.add("mvc","events",function(_443,_444){
var _445=this.Action=new Class(_444.Events,function(){
this.initialize=function(self){
_444.Events.initialize(self);
self.view=null;
};
this.execute=function(self,view){
self.view=view;
view.load(self);
};
});
});
object.add("ui","string, options, dom, events",function(_449,_44a,_44b,dom,_44d){
var _44e=new Class(function(){
Class.keys(dom.Element).forEach(function(name){
var _450=dom.Element.get(name);
if(["initialize"].indexOf(name)!=-1){
return;
}
if(typeof _450!="function"){
return;
}
this[name]=function(self){
var args=[];
var arg;
for(var i=1;i<arguments.length;i++){
arg=arguments[i];
args.push((arg&&arg._node)?arg._node:arg);
}
return dom.Element.prototype[name].apply(self._node,args);
};
},this);
});
this.Components=new Class(Array,function(){
this.initialize=function(self,_456,type,_458){
if(!type){
type=_449.Component;
}
for(var i=0;i<_456.length;i++){
self.push(new type(_456[i],_458));
}
Class.keys(type).forEach(function(name){
if(typeof type.prototype[name]!="function"){
return;
}
self[name]=function(){
var _45b;
for(i=0;i<self.length;i++){
_45b=self[i];
if(typeof _45b[name]=="function"){
_45b[name].apply(self[i],arguments);
}
}
};
});
self.set=function(key,_45d){
for(var i=0;i<self.length;i++){
self[i].set(key,_45d);
}
};
self.get=function(key){
var _460=[];
for(var i=0;i<self.length;i++){
_460.push(self[i].get(key));
}
return _460;
};
};
});
this.define=function(_462,type,_464){
var prop=property(function(self){
return self[prop.__name__];
});
prop.isComponent=true;
prop.selector=_462;
prop.type=type||_449.Component;
prop.single=_464;
return prop;
};
this.define1=function(_467,type){
return _449.define(_467,type,1);
};
this.option=function(_469){
var prop;
function fget(self){
return self.getOption(prop.__name__);
}
function fset(self,_46d){
return self.setOption(prop.__name__,_46d);
}
prop=property(fget,fset);
prop.defaultValue=_469;
return prop;
};
var _46e=new Class(function(){
this.__new__=function(cls,name,base,dict){
if(dict.__metaclass__){
dict.__defaultOptions=[];
dict.__subs=[];
dict.__subEvents={};
dict.__onEvents=[];
dict.__handles=["init","reset","invalid","error"];
dict.__methods=[];
}else{
dict.__defaultOptions=[];
dict.__subs=[];
dict.__subEvents={};
dict.__onEvents=[];
dict.__handles=[];
dict.__methods=[];
Object.keys(dict).forEach(function(name){
if(name=="initialize"||name.indexOf("__")==0){
return;
}
var _474=dict[name];
if(_474!=null&&_474.__class__===property){
if(_474.isComponent){
dict.__subs.push(name);
}else{
dict.__defaultOptions.push(name);
}
}else{
if(typeof _474=="function"){
if(name.match(/^(_?[a-zA-Z]+)_([a-zA-Z]+)$/)){
(dict.__subEvents[RegExp.$1]=dict.__subEvents[RegExp.$1]||[]).push(RegExp.$2);
}else{
if(name.match(/^on([a-zA-Z]+)$/)){
dict.__onEvents.push(RegExp.$1);
}else{
if(name.slice(0,1)=="_"&&name.slice(0,2)!="__"&&name!="_set"){
dict.__handles.push(name.slice(1));
}else{
dict.__methods.push(name);
}
}
}
}
}
});
}
return type.__new__(cls,name,base,dict);
};
this.initialize=function(cls,name,base,dict){
var _479=cls.prototype;
var _47a=base.prototype;
_479.__handles.forEach(function(_47b){
cls.set(_47b,_44d.fireevent(function(self){
_479["_"+_47b].apply(self,[].slice.call(arguments,1));
}));
});
if(base&&_47a.addons){
_479.addons.push.apply(_479.addons,_47a.addons);
}
if(_479.addons){
_479.addons.forEach(function(comp){
var _47e=comp.prototype;
_47e.__defaultOptions.forEach(function(name){
var _480=_479.__defaultOptions;
if(_480.indexOf(name)!=-1){
return;
}
_480.push(name);
cls.set(name,comp.get(name));
});
_47e.__subs.forEach(function(name){
var subs=_479.__subs;
if(subs.indexOf(name)!=-1){
return;
}
subs.push(name);
cls.set(name,comp.get(name));
});
_47e.__handles.forEach(function(_483){
var _484=_479.__handles;
var _485="_"+_483;
if(_484.indexOf(_483)!=-1){
return;
}
_484.push(_483);
cls.set(_483,_47e[_483].im_func);
cls.set(_485,_47e[_485].im_func);
});
_47e.__methods.forEach(function(name){
var _487=_479.__methods;
if(_487.indexOf(name)!=-1){
return;
}
_487.push(name);
cls.set(name,_47e[name].im_func);
});
});
}
if(base&&base!==type){
_47a.__defaultOptions.forEach(function(name){
var _489=_479.__defaultOptions;
if(_489.indexOf(name)==-1){
_489.push(name);
}
});
_47a.__subs.forEach(function(name){
var subs=_479.__subs;
if(subs.indexOf(name)==-1){
subs.push(name);
}
});
_47a.__handles.forEach(function(_48c){
var _48d=_479.__handles;
if(_48d.indexOf(_48c)==-1){
_479.__handles.push(_48c);
}
});
_47a.__methods.forEach(function(name){
var _48f=_479.__methods;
if(_48f.indexOf(name)==-1){
_48f.push(name);
}
});
Object.keys(_47a.__subEvents).forEach(function(_490){
var _491=_479.__subEvents;
_47a.__subEvents[_490].forEach(function(_492){
var _493=_491[_490];
if(_493&&_493.indexOf(_492)!=-1){
return;
}
(_491[_490]=_491[_490]||[]).push(_492);
});
});
_47a.__onEvents.forEach(function(_494){
var _495=_479.__onEvents;
if(_495.indexOf(_494)==-1){
_495.push(_494);
}
});
}
};
});
this.Component=new Class(function(){
this.__metaclass__=_46e;
var _496=function(type){
if(type==="number"){
return Number;
}else{
if(type==="string"){
return String;
}else{
if(type==="boolean"){
return Boolean;
}
}
}
};
this.__mixins__=[_44e];
this.initialize=function(self,node,_49a){
if(!node.nodeType){
if(typeof node=="string"){
node={template:node};
}
var data={};
self.__defaultOptions.forEach(function(key){
if(_49a[key]===undefined){
data[key]=self.get(key);
}
});
object.extend(data,_49a);
var _49d;
if(node.section){
_49d={};
_49d[node.section]=data;
}else{
_49d=data;
}
var str=_44a.substitute(node.template,_49d);
node=dom.Element.fromString(str);
}
self.__nodeMap={};
self.__rendered={};
self._node=dom.wrap(node);
self.__initOptions(_49a);
self.__initEvents();
self.__initSubs();
self.init();
};
this.__initEvents=function(self){
if(!self.addons){
return;
}
self.addons.forEach(function(_4a0){
_4a0.prototype.__onEvents.forEach(function(_4a1){
var _4a2;
if(self.__handles.some(function(_4a3){
if(_4a3.toLowerCase()==_4a1){
_4a2=_4a3;
return true;
}
return false;
})){
self.addEvent(_4a2,function(_4a4){
var args=[_4a4].concat(_4a4._args);
_4a0.prototype["on"+_4a1].apply(self,args);
});
}
});
});
};
this.__initOptions=function(self,_4a7){
if(!_4a7){
_4a7={};
}
self._options={};
Object.keys(_4a7).forEach(function(name){
self._options[name]=_4a7[name];
});
self.__defaultOptions.forEach(function(name){
var data=self._node.getData(name.toLowerCase()),_4ab=self.__properties__[name].defaultValue,_4ac;
if(data){
_4ac=_496(typeof _4ab)(data);
self.__setOption(name,_4ac);
}else{
if(_4a7[name]){
self.__setOption(name,_4a7[name]);
}else{
self.__setOption(name,_4ab);
}
}
var _4ad=function(_4ae,cls){
if(_4ae){
_4ae.forEach(function(_4b0){
var _4b1="__option_"+_4b0+"_"+name;
var _4b2=name+"_"+_4b0;
self.addEvent(_4b1,function(_4b3){
if(cls){
cls.prototype[_4b2].call(self,_4b3.value);
}else{
self[_4b2](_4b3.value);
}
});
});
}
};
_4ad(self.__subEvents[name]);
if(self.addons){
self.addons.forEach(function(_4b4){
_4ad(_4b4.prototype.__subEvents[name],_4b4);
});
}
});
};
this.__initSubs=function(self){
self.__subs.forEach(function(name){
var sub=self.__properties__[name];
var _4b8=self._options[name];
if(_4b8&&!sub.template){
sub.template=_4b8.template;
sub.section=_4b8.templateSection;
}
if(_4b8&&_4b8.addons){
sub.type=new Class(sub.type,function(){
_4b8.addons.forEach(function(_4b9){
_449.addon(this,_4b9);
},this);
});
}
var node;
self.__initSub(name,self.__querySub(name));
});
};
this.__initSub=function(self,name,_4bd){
if(!self._node){
return null;
}
var sub=self.__properties__[name];
var _4bf;
var _4c0=self._options[name];
if(sub.single){
if(_4bd){
_4bf=new sub.type(_4bd,_4c0);
self.__fillSub(name,_4bf);
}
}else{
if(_4bd){
_4bf=new _449.Components(_4bd,sub.type,_4c0);
_4bf.forEach(function(comp){
self.__fillSub(name,comp);
});
}else{
_4bf=new _449.Components([],sub.type);
}
}
self["_"+name]=_4bd;
self._set(name,_4bf);
return _4bf;
};
this.__fillSub=function(self,name,comp){
var sub=self.__properties__[name];
var node=comp._node;
self.__addNodeMap(name,String(node.uid),comp);
var comp=self.__nodeMap[name][String(node.uid)];
var _4c7=function(_4c8,cls){
if(_4c8){
_4c8.forEach(function(_4ca){
var _4cb=name+"_"+_4ca;
node.addEvent(_4ca,function(_4cc){
if(cls){
cls.prototype[_4cb].apply(self,[_4cc,comp].concat(_4cc._args));
}else{
self[_4cb].apply(self,[_4cc,comp].concat(_4cc._args));
}
});
});
}
};
_4c7(self.__subEvents[name]);
if(self.addons){
self.addons.forEach(function(_4cd){
_4c7(_4cd.prototype.__subEvents[name],_4cd);
});
}
};
this.__querySub=function(self,name){
var sub=self.__properties__[name];
return sub.single?self._node.getElement(sub.selector):self._node.getElements(sub.selector);
};
this.__setOption=function(self,name,_4d3){
var _4d4="_"+name;
self[_4d4]=_4d3;
self._set(name,_4d3);
};
this.__addRendered=function(self,name,node){
var _4d8=self.__rendered;
if(!_4d8[name]){
_4d8[name]=[];
}
_4d8[name].push(node);
};
this.__addNodeMap=function(self,name,id,comp){
var _4dd=self.__nodeMap;
if(!_4dd[name]){
_4dd[name]={};
}
_4dd[name][id]=comp;
};
this._init=function(self){
};
this._invalid=function(self,msg){
if(!msg){
msg="\u8f93\u5165\u9519\u8bef";
}
alert(msg);
};
this._error=function(self,msg){
if(!msg){
msg="\u51fa\u9519\u5566\uff01";
}
alert(msg);
};
this._reset=function(self){
self.__subs.forEach(function(name){
var sub=self.__properties__[name];
var _4e6="_"+name;
if(self.__rendered[name]){
self.__rendered[name].forEach(function(node){
var comp=self.__nodeMap[name][node.uid];
delete self.__nodeMap[name][node.uid];
node.dispose();
if(sub.single){
self[name]=self[_4e6]=null;
}else{
self[name].splice(self[name].indexOf(comp),1);
self[_4e6].splice(self[_4e6].indexOf(node),1);
}
});
}
if(!sub.single){
self[name].forEach(function(comp){
comp.reset();
});
}else{
if(self[name]){
self[name].reset();
}
}
});
};
this.getOption=function(self,name){
var _4ec="_"+name;
if(self[_4ec]===undefined){
self[_4ec]=self.__properties__[name].defaultValue;
}
return self[_4ec];
};
this.setOption=_44b.overloadsetter(function(self,name,_4ef){
(function(self,name,_4f2){
var _4f3=Array.isArray(name)?name:name.split(".");
if(_4f3.length>1){
_449.setOptionTo(self._options,_4f3,_4f2);
if(self[_4f3[0]]){
arguments.callee(self[_4f3[0]],_4f3.slice(1),_4f2);
}
}else{
self.__setOption(name,_4f2);
self.fireEvent("__option_change_"+name,{value:_4f2});
}
})(self,name,_4ef);
});
this.render=function(self,name,data){
var sub=self.__properties__[name];
var _4f8="render"+_44a.capitalize(name);
var _4f9=name+"Render";
var _4fa;
if(!!(sub.single?self[name]:self[name].length)){
return;
}
if(self[_4f9]){
_4fa=self[_4f9](function(){
return self.make(name,data);
});
}else{
if(self[_4f8]){
_4fa=self[_4f8](data);
}else{
_4fa=self.__querySub(name);
}
}
if(_4fa){
if(sub.single){
if(Array.isArray(_4fa)||_4fa.constructor===dom.Elements){
throw "\u8fd9\u662f\u4e00\u4e2a\u552f\u4e00\u5f15\u7528\u5143\u7d20\uff0c\u8bf7\u4e0d\u8981\u8fd4\u56de\u4e00\u4e2a\u6570\u7ec4";
}
self.__addRendered(name,_4fa);
}else{
if(!Array.isArray(_4fa)&&_4fa.constructor!==dom.Elements){
throw "\u8fd9\u662f\u4e00\u4e2a\u591a\u5f15\u7528\u5143\u7d20\uff0c\u8bf7\u8fd4\u56de\u4e00\u4e2a\u6570\u7ec4";
}
_4fa=new dom.Elements(_4fa);
_4fa.forEach(function(node){
self.__addRendered(name,node);
});
}
self.__initSub(name,_4fa);
}
};
this.make=function(self,name,data){
var sub=self.__properties__[name];
var _500="_"+name;
var _501={};
var _502=self._options[name];
object.extend(_501,_502);
if(data){
Object.keys(data).forEach(function(key){
_501[key]=data[key];
});
}
var comp=new sub.type({template:sub.template,section:sub.section},_501);
var node=comp._node;
if(sub.single){
self[name]=comp;
self[_500]=node;
}else{
self[name].push(comp);
self[_500].push(node);
}
self.__fillSub(name,comp);
self.__addRendered(name,node);
return comp;
};
this.setTemplate=function(self,name,_508,_509){
self.__properties__[name].template=_508;
self.__properties__[name].section=_509;
};
this.getNode=function(self){
return self._node;
};
this.define=staticmethod(_449.define);
this.define1=staticmethod(_449.define1);
});
this.addon=function(dict,_50c){
if(!dict.addons){
dict.addons=[];
}
dict.addons.push(_50c);
};
this.parseOptions=function(_50d){
var _50e={};
Object.keys(_50d).forEach(function(name){
_449.setOptionTo(_50e,name,_50d[name]);
});
return _50e;
};
this.setOptionTo=function(_510,name,_512){
var _513=Array.isArray(name)?name:name.split(".");
for(var i=0,part;i<_513.length-1;i++){
part=_513[i];
if(_510[part]===undefined){
_510[part]={};
}
_510=_510[part];
}
_510[_513[_513.length-1]]=_512;
};
});
object.add("ui.decorators","events",function(_516,_517){
this.fireevent=_517.fireevent;
});
object.add("urlparse",function(){
this.urljoin=function(base,url){
var _51a=_51b(base);
var _51c=_51b(url);
var _51d=[];
if(_51c[0]){
return url;
}else{
_51d[0]=_51a[0];
_51d[1]=_51a[1];
}
if(_51c[2]){
if(_51c[2][0]=="/"){
_51d[2]=_51c[2];
}else{
path=_51a[2];
_51d[2]=path.substring(0,path.lastIndexOf("/")+1)+_51c[2];
}
}else{
return base;
}
return _51e(_51d);
};
var _51b=this.urlparse=function(url){
return url.match(/^(?:(\w+?)\:\/\/([\w-_.]+(?::\d+)?))?(.*?)?(?:;(.*?))?(?:\?(.*?))?(?:\#(\w*))?$/i).slice(1);
};
var _51e=this.urlunparse=function(_520){
var url="";
if(_520[0]){
url+=_520[0]+"://"+_520[1];
}
url+=_520[2];
if(_520[3]){
url+=";"+_520[3];
}
if(_520[4]){
url+="?"+_520[4];
}
if(_520[5]){
url+="#"+_520[5];
}
return url;
};
});
object.add("validator",function(_522){
this.isUrl=function(text){
return /^(?:(\w+?)\:\/\/([\w-_.]+(?::\d+)?))(.*?)?(?:;(.*?))?(?:\?(.*?))?(?:\#(\w*))?$/i.test(text);
};
this.isEmail=function(text){
return /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/i.test(text);
};
this.isIP=function(text){
return /^(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5]).(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5]).(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5]).(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5])$/.i.test(text);
};
});
object.add("ua.extra","sys",function(_526,sys){
var _528=sys.modules["ua"];
if(_528){
var ua=navigator.userAgent,m,_52b,o={},_52d=_528.numberify;
var _52e=function(key){
try{
return window.external[key];
}
catch(e){
return null;
}
};
if(m=ua.match(/360SE/)||(_52e("twGetRunPath")&&window.external.twGetRunPath().indexOf("360se.exe")!=-1)){
o[_52b="se360"]=3;
}else{
if(m=ua.match(/Maxthon/)||_52e("max_version")){
_52b="maxthon";
try{
o[_52b]=_52d(window.external["max_version"]);
}
catch(ex){
o[_52b]=0;
}
}else{
if(m=ua.match(/TencentTraveler\s([\d.]*)/)){
o[_52b="tt"]=m[1]?_52d(m[1]):0;
}else{
if(m=ua.match(/TheWorld/)){
o[_52b="theworld"]=3;
}else{
if(m=ua.match(/SE\s([\d.]*)/)){
o[_52b="sogou"]=m[1]?_52d(m[1]):0;
}else{
if(m=ua.match(/QQBrowser.([\d.]*)/)){
o[_52b="qqbrowser"]=m[1]?_52d(m[1]):0;
}
}
}
}
}
}
_52b&&(o.shell=_52b);
object.extend(_528.ua,o);
}
});
object.add("ua.flashdetect",function(_530){
this.getFlashVersion=function(){
var _ver=false;
if(navigator.plugins&&navigator.mimeTypes.length){
var x=navigator.plugins["Shockwave Flash"];
if(x&&x.description){
_ver=x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split(".")[0];
}
}else{
if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){
var axo=1;
var _534=3;
while(axo){
try{
_534++;
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_534);
_ver=_534;
}
catch(e){
axo=null;
}
}
}else{
try{
var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
}
catch(e){
try{
var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
_ver=6;
axo.AllowScriptAccess="always";
}
catch(e){
if(_ver==6){
return _ver;
}
}
try{
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
}
catch(e){
}
}
if(axo!=null){
_ver=axo.GetVariable("$version").split(" ")[1].split(",")[0];
}
}
}
return _ver;
};
});
object.add("XN","dom, ua",function(_535,dom,ua){
this.DEBUG_MODE=false;
var _538="http://s.xnimg.cn/";
this.debug={log:function(){
},on:function(){
_535.DEBUG_MODE=true;
if(window.console&&console.log){
_535.debug.log=function(s){
console.log(s);
};
}
},off:function(){
_535.debug.log=function(){
};
}};
this.namespace=function(){
var a=arguments,o=null,i,j,d;
for(i=0;i<a.length;i++){
d=a[i].split(".");
o=_535;
for(j=(d[0]=="XN")?1:0;j<d.length;j++){
o[d[j]]=o[d[j]]||{};
o=o[d[j]];
}
}
return o;
};
this.log=function(s){
_535.debug.log(s);
};
this.isUndefined=function(_540){
return typeof _540=="undefined";
};
this.isString=function(_541){
return typeof _541=="string";
};
this.isElement=function(_542){
return _542&&_542.nodeType==1;
};
this.isFunction=function(_543){
return typeof _543=="function";
};
this.isObject=function(_544){
return typeof _544=="object";
};
this.isArray=function(_545){
return Object.prototype.toString.call(_545)==="[object Array]";
};
this.isNumber=function(_546){
return typeof _546=="number";
};
this.$extend=function(){
var _547=arguments[0];
for(var i=1;i<arguments.length;i++){
if(typeof arguments[i]=="object"){
for(var key in arguments[i]){
_547[key]=arguments[i][key];
}
}
}
return _547;
};
this.namespace("config");
this.config.jumpOut=true;
(function(){
var _54a={};
var _54b={};
_535.getFileVersionNum=function(file){
return _54b[file];
};
function hasLoad(file){
return !!getFile(file);
}
function getFile(file){
return _54a[encodeURIComponent(file)];
}
function mark(file){
var obj={};
obj.file=file;
obj.isLoad=true;
obj.isLoaded=true;
_54a[encodeURIComponent(file)]=obj;
}
function enableCustomEvent(_551){
_551.addEvent=function(type,func){
if(!this._customEventListeners){
this._customEventListeners={};
}
var _554=this._customEventListeners;
if(_535.isUndefined(_554[type])){
_554[type]=[];
}
_554[type].push(func);
return this;
},_551.delEvent=function(type,func){
var _557=this._customEventListeners[type];
if(_557){
for(var i=_557.length-1;i>=0;i--){
if(_557[i]==func){
_557[i]=null;
break;
}
}
}
return this;
},_551.fireEvent=function(type){
if(!this._customEventListeners||!this._customEventListeners[type]){
return;
}
var _55a=this._customEventListeners[type],ars=buildArray(arguments);
ars.shift();
for(var i=0,j=_55a.length;i<j;i++){
if(_55a[i]){
try{
_55a[i].apply(this,ars);
}
catch(ox){
if(_535.DEBUG_MODE){
throw ox;
}
}
}
}
};
}
function buildArray(o){
var rt=[];
for(var i=0,j=o.length;i<j;i++){
rt.push(o[i]);
}
return rt;
}
function addFile(file){
var obj={};
obj.file=file;
obj.isLoaded=false;
enableCustomEvent(obj);
obj.addEvent("load",function(){
this.isLoaded=true;
});
_54a[encodeURIComponent(file)]=obj;
var el=document.createElement("script");
el.type="text/javascript";
el.src=file;
el.async=true;
obj.element=el;
if(ua.ua.shell=="ieshell"){
el.onreadystatechange=function(){
if((this.readyState=="loaded"||this.readyState=="complete")&&!this.hasLoad){
this.hasLoad=true;
var _565=getFile(file);
if(_565!=null){
_565.fireEvent("load");
}else{
try{
_535.loadFile(file);
}
catch(e){
}
}
}
};
}else{
el.onerror=el.onload=function(){
var tmp=getFile(file);
if(tmp){
tmp.fireEvent("load");
}
};
}
Sizzle("head")[0].insertBefore(el,null);
}
function loadFile(file,_568,_569){
var isJS=false,_56b=false;
if(_535.isObject(file)){
isJS=(file.type=="js");
_56b=(file.type=="css");
file=file.file;
}
file=getFullName(file);
if(/\.js(\?|$)/.test(file)||isJS){
if(_569||!hasLoad(file)){
addFile(file);
}
if(!_568){
return;
}
if(getFile(file).isLoaded){
_568.call(getFile(file),true);
}else{
getFile(file).addEvent("load",function(){
_568(true);
});
getFile(file).addEvent("error",function(){
_568(false);
});
}
}else{
if(/\.css(\?|$)/.test(file)||_56b){
if(!_569&&hasLoad(file)){
if(_568){
_568.call(getFile(file));
}
return;
}
mark(file);
var el=document.createElement("link");
el.rel="stylesheet";
el.type="text/css";
el.href=file;
Sizzle("head")[0].insertBefore(el,null);
if(_568){
_568.call(getFile(file));
}
}
}
}
function getFullName(file){
runOnce(loadVersion);
if(!_54b[file]){
return file;
}
return _54b[file].file;
}
var _56e=new RegExp("("+_538+")"+"(a?\\d+)/([^?]*)");
var _56f=new RegExp("(.*)\\?ver=(d+)(..*)");
function getVersion(file){
var _571;
if(_571=_56e.exec(file)){
_54b[_571[1]+_571[3]]={file:file,version:_571[2]};
}else{
if(_571=_56f.exec(file)){
_54b[_571[1]]={file:file,version:_571[2]};
}
}
}
_535.getFileVersion=function(_572){
_572.forEach(function(v,i){
getVersion(v);
});
};
_535.loadFile=function(file,_576,_577){
dom.ready(function(){
loadFile(file,_576,_577);
});
};
_535.unloadFile=function(node){
if(node.parentNode){
node.parentNode.removeChild(node);
_54a[encodeURIComponent(node.src)]=null;
}
};
_535.clearFiles=function(){
for(var i in _54a){
if(_54a.hasOwnProperty(i)){
if(_54a[i]&&_54a[i].element){
_535.unloadFile(_54a[i].element);
}
}
}
};
_535.loadFiles=function(_57a,_57b){
var f=_57a.length;
function isAllLoad(){
f--;
if(f===0&&_57b){
_57b();
}
}
_57a.forEach(function(v,i){
_535.loadFile(v,isAllLoad);
});
};
_535.getVersion=function(file){
getVersion(file);
};
function loadVersion(){
buildArray(document.getElementsByTagName("script")).forEach(function(v,i){
if(v.src){
mark(v.src);
getVersion(v.src);
}
if(v.getAttribute("vsrc")){
getVersion(v.getAttribute("vsrc"));
}
});
buildArray(document.getElementsByTagName("link")).forEach(function(v,i){
if(v.rel&&v.rel=="stylesheet"){
mark(v.href);
getVersion(v.href);
}
if(v.getAttribute("vhref")){
getVersion(v.getAttribute("vhref"));
}
});
_535.log("load file version:");
_535.log(_54b);
}
_535.dynamicLoad=function(file){
file.funcs.forEach(function(func,i){
window[func]=function(){
var ars=arguments;
window[func]=null;
if(file.file){
file.files=[file.file];
}
_535.loadFiles(file.files,function(){
window[func].apply(null,ars);
if(file.callBack){
file.callBack.call(null);
}
});
};
});
};
_535.namespace("img");
_535.img.getVersion=function(file){
runOnce(loadVersion);
if(!_54b[file]){
return "";
}
return _54b[file].version;
};
_535.img.getFullName=function(file){
return getFullName(file);
};
function runOnce(func){
if(window.runOnceFunc==null){
window.runOnceFunc={};
}
if(window.runOnceFunc[func]){
return null;
}
window.runOnceFunc[func]=true;
return func();
}
})();
});
object.add("XN.array","XN",function(_58b,XN){
this.toQueryString=function(a,key){
var rt=[],t;
for(var k in a){
t=a[k];
if(XN.isFunction(t)){
continue;
}
if(XN.isObject(t)){
rt.push(arguments.callee(t,k));
}else{
if(/^\d+$/.test(k)){
rt.push((key||k)+"="+encodeURIComponent(t));
}else{
rt.push(k+"="+encodeURIComponent(t));
}
}
}
return rt.join("&");
};
this.each=function(a,func){
if(!a){
return;
}
if(!XN.isUndefined(a.length)||!XN.isUndefined(a[0])){
for(var i=0,j=a.length;i<j;i++){
if(func.call(a,i,a[i])===false){
break;
}
}
}else{
for(var key in a){
if(!XN.isFunction(a[key])){
if(func.call(a,key,a[key])===false){
break;
}
}
}
}
};
this.include=function(a,_598){
var r=false;
_58b.each(a,function(i,v){
if(v===_598){
r=true;
return false;
}
});
return r;
};
this.build=function(o){
var rt=[];
for(var i=0,j=o.length;i<j;i++){
rt.push(o[i]);
}
return rt;
};
});
object.add("XN.func",function(_5a0){
if(window.runOnceFunc==null){
window.runOnceFunc={};
}
this.empty=function(){
};
this.runOnce=function(func){
if(window.runOnceFunc[func]){
return null;
}
window.runOnceFunc[func]=true;
return func();
};
});
object.add("XN.string","XN",function(_5a2,XN){
this.nl2br=function(str){
return (str||"").replace(/([^>])\n/g,"$1<br />");
};
this.trim=function(str){
return (str||"").replace(/^\s+|\s+$/g,"");
};
this.ltrim=function(str){
return (str||"").replace(/^\s+/,"");
};
this.rtrim=function(str){
return (str||"").replace(/\s+$/,"");
};
this.strip=function(str){
return _5a2.trim(str);
};
this.stripTags=function(str){
return str.replace(/<\/?[^>]+>/igm,"");
};
this.escapeHTML=function(str){
return str.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");
};
this.unescapeHTML=function(str){
return str.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&nbsp;/g," ").replace(/&quot;/g,"\"").replace(/&amp;/g,"&");
};
this.include=function(str,key){
return str.indexOf(key)>-1;
};
this.startsWith=function(str,key){
return str.indexOf(key)===0;
};
this.endsWith=function(str,key){
var d=str.length-key.length;
return d>=0&&str.lastIndexOf(key)===d;
};
this.isBlank=function(str){
return /^\s*$/.test(str);
};
this.isEmail=function(str){
return /^[A-Z_a-z0-9-\.]+@([A-Z_a-z0-9-]+\.)+[a-z0-9A-Z]{2,4}$/.test(str);
};
this.isMobile=function(str){
return /^((\(\d{2,3}\))|(\d{3}\-))?((1[345]\d{9})|(18\d{9}))$/.test(str);
};
this.isUrl=function(str){
return /^(http:|ftp:)\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"])*$/.test(str);
};
this.isIp=function(str){
return /^(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5]).(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5]).(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5]).(0|[1-9]\d?|[0-1]\d{2}|2[0-4]\d|25[0-5])$/.test(str);
};
this.isNumber=function(str){
return /^\d+$/.test(str);
};
this.isZip=function(str){
return /^[1-9]\d{5}$/.test(str);
};
this.isEN=function(str){
return /^[A-Za-z]+$/.test(str);
};
this.isJSON=function(str){
if(!XN.isString(str)||str===""){
return false;
}
str=str.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"/g,"");
return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);
};
this.getQuery=function(key,url){
url=url||window.location.href+"";
if(url.indexOf("#")!==-1){
url=url.substring(0,url.indexOf("#"));
}
var rts=[],rt;
var _5c0=new RegExp("(^|\\?|&)"+key+"=([^&]*)(?=&|#|$)","g");
while((rt=_5c0.exec(url))!=null){
rts.push(decodeURIComponent(rt[2]));
}
if(rts.length==0){
return null;
}
if(rts.length==1){
return rts[0];
}
return rts;
};
this.setQuery=function(key,_5c2,url){
url=url||window.location.href+"";
var hash="";
if(!/^http/.test(url)){
return url;
}
if(url.indexOf("#")!==-1){
hash=url.substring(url.indexOf("#"));
}
url=url.replace(hash,"");
url=url.replace(new RegExp("(^|\\?|&)"+key+"=[^&]*(?=&|#|$)","g"),"");
_5c2=XN.isArray(_5c2)?_5c2:[_5c2];
for(var i=_5c2.length-1;i>=0;i--){
_5c2[i]=encodeURIComponent(_5c2[i]);
}
var p=key+"="+_5c2.join("&"+key+"=");
return url+(/\?/.test(url)?"&":"?")+p+hash;
};
this.isNum=this.isNumber;
});
object.add("XN.json",function(_5c7){
this._PARSE_DATE=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z$/;
this.dateToString=function(d){
function _zeroPad(v){
return v<10?"0"+v:v;
}
return "\""+d.getUTCFullYear()+"-"+_zeroPad(d.getUTCMonth()+1)+"-"+_zeroPad(d.getUTCDate())+"T"+_zeroPad(d.getUTCHours())+":"+_zeroPad(d.getUTCMinutes())+":"+_zeroPad(d.getUTCSeconds())+"Z\"";
};
this.stringToDate=function(str){
if(_5c7._PARSE_DATE.test(str)){
var d=new Date();
d.setUTCFullYear(RegExp.$1,(RegExp.$2|0)-1,RegExp.$3);
d.setUTCHours(RegExp.$4,RegExp.$5,RegExp.$6);
return d;
}
};
this.parse=function(str){
return eval("("+str+")");
};
this.build=function(o,w,d){
return JSON.stringify(o,w,d);
};
});
object.add("XN.util","XN, XN.json, XN.array, XN.event, XN.string",function(_5d0,XN){
if(!window.__timeouts==null){
window.__timeouts=[];
window.__intervals=[];
}
this.setTimeout=function(a,b){
var _5d4=setTimeout(a,b);
window.__timeouts.push(_5d4);
return _5d4;
};
this.setInterval=function(a,b){
var _5d7=setInterval(a,b);
window.__intervals.push(_5d7);
return _5d7;
};
this.clearTimeout=function(_5d8){
for(var i=0;i<window.__timeouts.length;i++){
if(window.__timeouts[i]==_5d8){
window.__timeouts.slice(i,1);
}
}
clearTimeout(_5d8);
};
this.clearInterval=function(_5da){
for(var i=0;i<window.__intervals.length;i++){
if(window.__intervals[i]==_5da){
window.__intervals.slice(i,1);
}
}
clearInterval(_5da);
};
this.clearAllTimer=function(){
for(var i=0;i<window.__timeouts.length;i++){
clearTimeout(window.__timeouts[i]);
}
for(var i=0;i<window.__intervals.length;i++){
clearInterval(window.__intervals[i]);
}
window.__timeouts=[];
window.__intervals=[];
};
this.cache=function(_5dd){
XN.$extend(this,_5dd);
this._cacheData=[];
};
this.cache.prototype={cacheLength:null,_cacheData:null,isExist:function(key){
return this.get(key);
},add:function(key,_5e0){
if(!XN.isUndefined(this.isExist(key))){
return;
}
if(this.cacheLength&&this.cacheLength==this._cacheData.length){
this._cacheData.shift();
}
this._cacheData.push({"key":key,"value":_5e0});
},get:function(key){
for(var i=this._cacheData.length-1;i>=0;i--){
if(this._cacheData[i].key==key){
return this._cacheData[i].value;
}
}
},clear:function(){
this._cacheData=[];
}};
(function(){
var _5e3={};
_5d0.hotKey={add:function(key,func,obj){
key=String(key).toLowerCase();
var ctrl=false;
var alt=false;
var _5e9=false;
var _5ea=null;
if(/^\d+$/.test(key)){
_5ea=parseInt(key);
}else{
ctrl=/ctrl|ctr|c/.test(key);
alt=/alt|a/.test(key);
_5e9=/shift|s/.test(key);
if(/\d+/.test(key)){
_5ea=parseInt(/\d+/.exec(key)[0]);
}else{
_5ea=false;
}
}
_5e3[key]=_5e3[key]||{};
_5e3[key][func]=function(e){
e=e||window.event;
code=e.keyCode;
if(ctrl&&!e.ctrlKey){
return;
}
if(alt&&!e.altKey){
return;
}
if(_5e9&&!e.shiftKey){
return;
}
if(_5ea&&code!==_5ea){
return;
}
func.call(obj||null);
XN.event.stop(e);
};
XN.event.addEvent(document,"keydown",_5e3[key][func]);
},del:function(key,func){
key=String(key).toLowerCase();
XN.event.delEvent(document,"keydown",_5e3[key][func]);
delete _5e3[key][func];
}};
})();
(function(){
var id=0;
_5d0.createObjID=function(){
id++;
return id;
};
})();
});
object.add("XN.datasource","XN, XN.json, XN.net, XN.string, XN.array",function(_5ef,XN){
this.DS_JSON=function(p){
XN.$extend(this,p);
};
this.DS_JSON.prototype={DS_TYPE:"JSON",url:null,queryParam:"query",attachParam:"",rootKey:null,method:"get",_request:null,query:function(v,_5f3){
var This=this;
try{
this._request.abort();
}
catch(e){
}
function parseDS_JSON(r){
r=r.responseText;
var pp;
try{
var rt=XN.json.parse(r);
if(This.rootKey&&rt[This.rootKey]){
pp=rt[This.rootKey];
}else{
pp=rt;
}
}
catch(e){
pp=[];
}
_5f3(pp);
}
this._request=new XN.net.xmlhttp({url:this.url,data:this.queryParam+"="+encodeURIComponent(v)+"&"+this.attachParam,method:this.method,onSuccess:parseDS_JSON});
}};
this.DS_friends=function(p){
var ds=new _5ef.DS_JSON(p);
ds.queryParam="p";
ds.rootKey="candidate";
ds.net="";
ds.group="";
ds.page=XN.isUndefined(p.page)?false:p.page;
ds.param=XN.json.build(p.param||{});
var _5fa=XN.isUndefined(p.limit)?24:p.limit;
ds.query=function(name,_5fc){
XN.log("start query");
name=name.replace(/[^a-zA-Z\u0391-\uFFE5]/g,"");
if(XN.string.isBlank(name)&&this.group==""&&this.net==""){
_5fc([]);
return;
}
var p=["{\"init\":false,","\"qkey\":\""+this.qkey+"\",","\"uid\":true,","\"uname\":true,","\"uhead\":true,","\"limit\":"+_5fa+",","\"param\":"+this.param+",","\"query\":\""+name+"\",","\"group\":\""+this.group+"\",","\"net\":\""+this.net+"\",","\"page\":\""+this.page+"\"","}"].join("");
_5ef.DS_JSON.prototype.query.call(this,p,_5fc);
};
return ds;
};
this.DS_Array=function(p){
XN.$extend(this,p);
this.init();
};
this.DS_Array.prototype={DS_TYPE:"array",data:null,searchKey:null,init:function(){
var key=this.searchKey,_600=this._index=[];
XN.array.each(this.data,function(i,v){
_600.push(v[key]);
});
},query:function(v,_604){
_604(this._search(v));
},_search:function(v){
var keys=this._index,data=this.data,rt=[],reg=new RegExp("^"+v,"i");
XN.array.each(keys,function(i,v){
if(reg.test(v)){
rt.push(data[i]);
}
});
return rt;
}};
this.DS_XHR=function(p){
XN.$extend(this,p);
};
this.DS_XHR.prototype={url:null,queryParam:"query",_request:null,query:function(v,_60e){
var This=this;
try{
this._request.abort();
}
catch(e){
}
function parseDS_XML(r){
r=r.responseXML;
var rt=[];
function getResult(r){
var tmp={};
XN.array.each(r.childNodes,function(i,v){
tmp[v.tagName.toLowerCase()]=v.firstChild.nodeValue;
});
return tmp;
}
try{
var rs=r.getElementsByTagName("Result");
XN.array.each(rs,function(i,v){
rt.push(getResult(v));
});
}
catch(e){
rt=[];
}
_60e(rt);
}
this._request=new XN.net.xmlhttp({url:this.url,data:this.queryParam+"="+encodeURIComponent(v),onSuccess:parseDS_XML});
}};
});
object.add("XN.browser","sys, XN",function(_619,sys,XN){
this.IE=!!(window.attachEvent&&!window.opera);
this.IE6=navigator.userAgent.indexOf("MSIE 6.0")>-1;
this.IE7=navigator.userAgent.indexOf("MSIE 7.0")>-1;
this.IE8=navigator.userAgent.indexOf("MSIE 8.0")>-1;
this.Opera=!!window.opera,this.WebKit=navigator.userAgent.indexOf("AppleWebKit/")>-1;
this.Gecko=navigator.userAgent.indexOf("Gecko")>-1&&navigator.userAgent.indexOf("KHTML")==-1;
this.copy=function(o){
function onfail(){
if(XN.isElement(o)){
o.select();
}
}
var str;
if(XN.isElement(o)){
str=o.value;
}else{
str=o;
}
var _do=sys.modules["XN.Do"];
if(window.clipboardData&&clipboardData.setData){
if(clipboardData.setData("text",str)){
return true;
}
}else{
if(_do){
_do.alert({message:"\u60a8\u7684\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u811a\u672c\u590d\u5236,\u8bf7\u5c1d\u8bd5\u624b\u52a8\u590d\u5236",callBack:function(){
onfail();
}});
}else{
alert("\u60a8\u7684\u6d4f\u89c8\u5668\u4e0d\u652f\u6301\u811a\u672c\u590d\u5236,\u8bf7\u5c1d\u8bd5\u624b\u52a8\u590d\u5236");
}
return false;
}
if(_do){
_do.alert({message:"\u60a8\u7684\u6d4f\u89c8\u5668\u8bbe\u7f6e\u4e0d\u5141\u8bb8\u811a\u672c\u8bbf\u95ee\u526a\u5207\u677f",callBack:function(){
onfail();
}});
}else{
alert("\u60a8\u7684\u6d4f\u89c8\u5668\u8bbe\u7f6e\u4e0d\u5141\u8bb8\u811a\u672c\u8bbf\u95ee\u526a\u5207\u677f");
}
return false;
};
});
object.add("XN.cookie","XN",function(_61f,XN){
this.get=function(name){
var _622=name+"=";
var ca=document.cookie.split(";");
for(var i=0;i<ca.length;i++){
var c=ca[i];
while(c.charAt(0)==" "){
c=c.substring(1,c.length);
}
if(c.indexOf(_622)==0){
return decodeURIComponent(c.substring(_622.length,c.length));
}
}
return null;
};
this.set=function(name,_627,days,path,_62a,_62b){
var _62c;
if(XN.isNumber(days)){
var date=new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
_62c=date.toGMTString();
}else{
if(XN.isString(days)){
_62c=days;
}else{
_62c=false;
}
}
document.cookie=name+"="+encodeURIComponent(_627)+(_62c?";expires="+_62c:"")+(path?";path="+path:"")+(_62a?";domain="+_62a:"")+(_62b?";secure":"");
};
this.del=function(name,path,_630,_631){
_61f.set(name,"",-1,path,_630,_631);
};
});
object.add("XN.net","XN, XN.form, XN.util, XN.event, XN.func, XN.browser, XN.element",function(_632,XN){
if(!window.__ajaxProxies){
window.__ajaxProxies={};
}
this.sendForm=function(_634){
XN.log("send form");
_634.data=XN.form.serialize(_634.form);
return new _632.xmlhttp(_634);
};
this.sendStats=function(url){
var n="log_"+(new Date()).getTime();
var c=window[n]=new Image();
c.onload=(c.onerror=function(){
window[n]=null;
});
c.src=url;
c=null;
};
this.xmlhttp=function(_638){
var This=this;
if(!_632.cache){
_632.cache=new XN.util.cache();
}
if(arguments.length>1){
this.url=arguments[0]||null;
this.data=arguments[1]||"";
this.onSuccess=arguments[2];
extendObject(this,arguments[3]);
init(window);
return this;
}
extendObject(this,_638);
var _63a;
if(this.useCache&&(_63a=_632.cache.get(this.url+encodeURIComponent(this.data)))){
this.transport={};
this.transport.responseText=_63a;
setTimeout(function(){
This._onComplete();
This._onSuccess();
},0);
return this;
}
function init(w){
This.transport=This.getTransport(w);
return This.url&&This.send(This.method);
}
function getDomain(link){
var a=XN.element.$element("a");
a.href=link;
return a.hostname;
}
var _63e=getDomain(this.url);
if(/^http/.test(this.url)&&location.hostname!=_63e){
if(window.__ajaxProxies[_63e]){
(function(){
if(window.__ajaxProxies[_63e].loaded){
init(window.__ajaxProxies[_63e].contentWindow);
}else{
setTimeout(arguments.callee,100);
}
})();
}else{
var _63f=XN.element.$element("iframe").hide();
document.body.insertBefore(_63f,document.body.firstChild);
_63f.src="http://"+_63e+"/ajaxproxy.htm";
window.__ajaxProxies[_63e]=_63f;
window.__ajaxProxies[_63e].loaded=false;
XN.event.addEvent(_63f,"load",function(){
if(_63f.contentWindow.location.href!==_63f.src){
_63f.contentWindow.location.href=_63f.src;
}else{
try{
init(_63f.contentWindow);
window.__ajaxProxies[_63e]=_63f;
window.__ajaxProxies[_63e].loaded=true;
}
catch(e){
}
}
});
}
}else{
init(window);
}
return This;
};
this.xmlhttp.prototype={url:null,data:"",onStart:new Function(),onSuccess:null,onFailure:null,onError:null,fillTo:null,method:"post",asynchronous:true,transport:null,headers:null,iAmXmlhttp:true,useCache:false,requestToken:true,binary:false,formData:false,abort:function(){
this.transport.abort();
},send:function(_640){
var _url;
if(_640=="get"&&this.data!==""){
_url=this.url+(/\?/.test(this.url)?"&":"?")+this.data;
}else{
_url=this.url;
}
this.transport.onreadystatechange=this.onStateChange.bind(this);
this.transport.open(_640,_url,this.asynchronous);
if(!this.formData){
this.transport.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
}
if(this.headers!==null){
for(var i in this.headers){
this.transport.setRequestHeader(i,this.headers[i]);
}
}
var _643=null;
if(_640=="post"){
_643=this.data;
if(this.requestToken&&XN.get_check){
_643+=(_643?"&":"")+"requestToken="+XN.get_check;
}
if(this.requestToken&&XN.get_check_x){
_643+=(_643?"&":"")+"_rtk="+XN.get_check_x;
}
}
try{
if(window.event&&document.body.id=="profile"&&_640=="get"&&/(none|null)\b/.test(this.url)&&XN.user.id%10==0){
var temp=document.createElement("div");
var obj=event.srcElement;
temp.appendChild(obj);
if(obj){
var _643={from:"profile",nodeHTML:temp.innerHTML};
nullOrNoneLog(_643);
}
}
}
catch(e){
}
function nullOrNoneLog(data){
var _647="";
for(var i in data){
_647=_647+"&"+i+"="+encodeURIComponent(data[i]);
}
var _649=new Image().src="http://123.125.44.44/r/?t="+new Date().getTime()+_647;
}
if(this.binary){
this.transport.sendAsBinary(_643);
}else{
this.transport.send(_643);
}
},_onSuccess:function(obj){
var _64b=this.transport;
if(this.fillTo!==null){
try{
this.fillTo.stopLoading();
}
catch(e){
}
this.fillTo.innerHTML=_64b.responseText;
}
try{
if(this.onSuccess){
this.onSuccess.call(null,_64b);
}
}
catch(e){
if(XN.DEBUG_MODE){
throw e;
}
}
},_onComplete:function(obj){
var _64d=this.transport;
try{
if(this.onComplete){
this.onComplete.call(null,_64d);
}
}
catch(e){
if(XN.DEBUG_MODE){
throw e;
}
}
},onStateChange:function(){
var _64e=this.transport;
if(_64e.readyState==1&&!this.hasRunStart){
this.onStart();
this.hasRunStart=true;
}else{
if(_64e.readyState==4){
if(_64e.status==undefined||_64e.status==0||(_64e.status>=200&&_64e.status<300)){
if(this.useCache){
_632.cache.add(this.url+encodeURIComponent(this.data),this.transport.responseText);
}
this._onSuccess();
}else{
(this.onError||this.onFailure||XN.func.empty).call(null,_64e);
}
this._onComplete();
}
}
}};
this.xmlhttp.prototype.getTransport=function(w){
if(w!=window){
return w.getTransport();
}else{
if(XN.browser.IE){
try{
return new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e){
return new ActiveXObject("Microsoft.XMLHTTP");
}
}else{
return new XMLHttpRequest();
}
}
};
this.ajax=this.xmlhttp;
XN.$extend(this.xmlhttp.prototype,{get:function(url,data,_652,_653){
this.url=url;
this.data=data;
this.onSuccess=_652;
XN.$extend(this,_653);
this.send("get");
},post:function(url,data,_656,_657){
this.url=url;
this.data=data;
this.onSuccess=_656;
XN.$extend(this,_657);
this.send("post");
}});
if(typeof Ajax=="undefined"){
Ajax={};
Ajax.Request=function(url,o){
var p=o.parameters;
o["url"]=url;
o["data"]=p;
delete o.parameters;
return new _632.xmlhttp(o);
};
}
});
object.add("XN.env",function(_65b){
this.shortSiteName="\ufffd\ufffd\ufffd\ufffd";
this.siteName="\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd";
this.domain=window.location.hostname.split(".").reverse().slice(0,2).reverse().join(".");
this.domain_reg=this.domain.replace(/\./g,"\\.");
this.staticRoot="http://s.xnimg.cn/";
this.CDNstaticRoot="http://a.xnimg.cn/";
this.swfRoot="http://static.xiaonei.com/";
this.wwwRoot="http://"+this.domain+"/";
});
object.add("XN.event","XN, XN.browser, XN.array, XN.element",function(_65c,XN){
var _65e=XN.browser;
var _65f=[];
this.ignoreEvent=false;
this.logEvents=false;
this.isCapsLockOn=function(e){
var c=e.keyCode||e.which;
var s=e.shiftKey;
if(((c>=65&&c<=90)&&!s)||((c>=97&&c<=122)&&s)){
return true;
}
return false;
};
this.element=function(e){
var n=e.target||e.srcElement;
return _65c.resolveTextNode(n);
};
this.relatedTarget=function(e){
var t=e.relatedTarget;
if(!t){
if(e.type=="mouseout"||e.type=="mouseleave"){
t=e.toElement;
}else{
if(e.type=="mouseover"){
t=e.fromElement;
}
}
}
return _65c.resolveTextNode(t);
};
this.resolveTextNode=function(n){
try{
if(n&&3==n.nodeType){
return n.parentNode;
}
}
catch(e){
}
return n;
};
this.pointerX=function(_668){
return _668.pageX||(_668.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft));
};
this.pointerY=function(_669){
return _669.pageY||(_669.clientY+(document.documentElement.scrollTop||document.body.scrollTop));
};
this.isStrictMode=document.compatMode!="BackCompat";
this.pageHeight=function(){
return this.isStrictMode?Math.max(document.documentElement.scrollHeight,document.documentElement.clientHeight):Math.max(document.body.scrollHeight,document.body.clientHeight);
};
this.pageWidth=function(){
return this.isStrictMode?Math.max(document.documentElement.scrollWidth,document.documentElement.clientWidth):Math.max(document.body.scrollWidth,document.body.clientWidth);
};
this.winWidth=function(){
return this.isStrictMode?document.documentElement.clientWidth:document.body.clientWidth;
};
this.winHeight=function(){
return this.isStrictMode?document.documentElement.clientHeight:document.body.clientHeight;
};
this.scrollTop=function(){
if(XN.browser.WebKit){
return window.pageYOffset;
}
return this.isStrictMode?document.documentElement.scrollTop:document.body.scrollTop;
};
this.scrollLeft=function(){
if(XN.browser.WebKit){
return window.pageXOffset;
}
return this.isStrictMode?document.documentElement.scrollLeft:document.body.scrollLeft;
};
this.stop=null;
this.clearEvents=function(){
for(var _66a,i=0;_66a=_65f[i];i++){
_65c.delEvent.apply(_65c,_66a);
}
_65f=[];
};
this.addEvent=function(el,name,func,cap){
if(_65c.ignoreEvent){
return;
}
var els=[];
el=XN.element.$(el);
if(XN.isArray(el)){
els=el;
}else{
els.push(el);
}
if(els.length==0){
return el;
}
XN.array.each(els,function(i,v){
if(_65c.logEvents){
_65f.push([v,name,func,cap]);
}
_65c._addEvent(v,name,func,cap);
});
return el;
};
this.delEvent=function(el,name,func,cap){
var els=[];
el=XN.element.$(el);
if(XN.isArray(el)){
els=el;
}else{
els.push(el);
}
if(els.length==0){
return el;
}
XN.array.each(els,function(i,v){
_65c._delEvent(v,name,func,cap);
});
return el;
};
this._addEvent=null;
this._delEvent=null;
this.enableCustomEvent=function(obj){
XN.$extend(obj,{addEvent:function(type,func){
if(!this._customEventListeners){
this._customEventListeners={};
}
var _67d=this._customEventListeners;
if(XN.isUndefined(_67d[type])){
_67d[type]=[];
}
_67d[type].push(func);
return this;
},delEvent:function(type,func){
var _680=this._customEventListeners[type];
if(_680){
for(var i=_680.length-1;i>=0;i--){
if(_680[i]==func){
_680[i]=null;
break;
}
}
}
return this;
},fireEvent:function(type){
if(!this._customEventListeners||!this._customEventListeners[type]){
return;
}
var _683=this._customEventListeners[type],ars=XN.array.build(arguments);
ars.shift();
for(var i=0,j=_683.length;i<j;i++){
if(_683[i]){
try{
_683[i].apply(this,ars);
}
catch(ox){
if(XN.DEBUG_MODE){
throw ox;
}
}
}
}
}});
return obj;
};
if(_65e.IE){
this.stop=function(_687){
_687.returnValue=false;
_687.cancelBubble=true;
};
}else{
this.stop=function(_688){
_688.preventDefault();
_688.stopPropagation();
};
}
var _689=function(_68a,_68b){
var p=_68a.relatedTarget;
while(p&&p!=_68b){
try{
p=p.parentNode;
}
catch(error){
p=_68b;
}
}
return p!==_68b;
};
if(window.attachEvent&&!_65e.Opera){
function wrapEvent(_68d){
_68d.stopPropagation=function(){
this.cancelBubble=true;
};
_68d.preventDefault=function(){
this.returnValue=false;
};
return _68d;
}
this._addEvent=function(_68e,name,func){
_68e=XN.element.$(_68e);
if(name=="input"){
name="propertychange";
}
if(name=="keypress"){
name="keydown";
}
if(!_68e._eventListeners[name]){
_68e._eventListeners[name]=[];
}
var _691=function(){
var e=wrapEvent(window.event);
func.call(_68e,e);
};
_691.innerFunc=func;
_68e._eventListeners[name].push(_691);
_68e.attachEvent("on"+name,_691);
return _68e;
};
this._delEvent=function(_693,name,func){
_693=XN.element.$(_693);
if(name=="input"){
name="propertychange";
}
if(name=="keypress"){
name="keydown";
}
if(!_693._eventListeners[name]){
return;
}
for(var i=0,_697;i<_693._eventListeners[name].length;i++){
_697=_693._eventListeners[name][i];
if(_697.innerFunc===func){
break;
}
}
_693.detachEvent("on"+name,_697);
return _693;
};
}else{
if(window.addEventListener){
this._addEvent=function(_698,name,func,_69b){
_698=XN.element.$(_698);
if(name=="mouseleave"){
_698.onmouseleave=function(e){
e=e||window.event;
if(_689(e,_698)&&func){
func.call(_698,e);
}
};
_698.addEventListener("mouseout",_698.onmouseleave,_69b);
return _698;
}
if(name=="keypress"&&_65e.WebKit){
name="keydown";
}
_698.addEventListener(name,func,_69b);
return _698;
};
this._delEvent=function(_69d,name,func,_6a0){
_69d=XN.element.$(_69d);
if(name=="mouseleave"){
_69d.removeEventListener("mouseout",_69d.onmouseleave,_6a0);
return _69d;
}
if(name=="keypress"&&_65e.WebKit){
name="keydown";
}
_69d.removeEventListener(name,func,_6a0);
return _69d;
};
}
}
});
object.add("XN.dom","dom, ua, XN, XN.event, XN.array, XN.browser, XN.element",function(_6a1,dom,ua,XN){
var _6a5=XN.event;
var _6a6=XN.array;
var _6a7=XN.browser;
var _6a8=null;
function createShadow(_6a9,_6aa){
_6a9=_6a9||0.3;
_6aa=_6aa||2000;
var el=XN.element.$element("div");
_6a8=el;
el.style.position="absolute";
el.style.top=0;
el.style.left=0;
el.style.background="#000";
el.style.zIndex=_6aa;
el.style.opacity=_6a9;
el.style.filter="alpha(opacity="+(_6a9*100)+")";
el.innerHTML=["<iframe width=\"100%\" height=\"100%\" frameBorder=\"0\" style=\"position:absolute;top:0;left:0;z-index:1;\"></iframe>","<div style=\"position:absolute;top:0;left:0;width:100%;height:100%;background-color:#000000;z-index:2;height:expression(this.parentNode.offsetHeight);\"></div>"].join("");
function resize(){
el.hide();
el.style.height=XN.event.pageHeight()+"px";
el.style.width=XN.event.pageWidth()+"px";
el.show();
}
resize();
XN.event.addEvent(window,"resize",function(e){
if(_6a8&&_6a8.style.display!="none"){
try{
resize();
}
catch(e){
}
}
});
document.body.insertBefore(el,document.body.firstChild);
}
this.disable=function(_6ad,_6ae){
if(!_6a8){
createShadow(_6ad,_6ae);
}
};
this.enable=function(){
if(_6a8){
_6a8.remove();
_6a8=null;
}
};
this.insertAfter=function(_6af,_6b0){
_6af=XN.element.$(_6af);
_6b0=XN.element.$(_6b0);
var _6b1=_6b0.parentNode;
if(_6b1.lastChild==_6b0){
_6b1.appendChild(_6af);
}else{
_6b1.insertBefore(_6af,_6b0.nextSibling);
}
};
this.getElementsByClassName=function(_6b2,_6b3,_6b4){
var c=(XN.element.$(_6b3)||document).getElementsByTagName(_6b4||"*")||document.all;
var _6b6=[];
var _exp=new RegExp("(^|\\s)"+_6b2+"(\\s|$)");
_6a6.each(c,function(i,v){
if(_exp.test(v.className)){
_6b6.push(v);
}
});
return _6b6;
};
this.findFirstClass=function(_6ba,_6bb){
_6ba=XN.element.$(_6ba);
var els=_6a1.getElementsByClassName(_6bb,_6ba);
return XN.element.$(els[0])||null;
};
this.ready=function(_6bd,_6be){
if(XN.isUndefined(_6be)){
_6be=false;
}
var func=_6be?function(){
setTimeout(_6bd,0);
}:_6bd;
dom.ready(func);
};
this.preloadImg=function(src){
src=XN.isArray(src)?src:[src];
_6a6.each(src,function(i,v){
new Image().src=v;
});
};
this.readyDo=this.ready;
});
object.add("XN.element","sys, XN, XN.browser, XN.env",function(_6c3,sys,XN){
var _6c6=XN.browser;
var _6c7=["clear","hover","scrollTo","visible","toggleClass","toggleText","hasClassName","addClass","delClass","show","hide","remove","setStyle","getStyle","addEvent","delEvent","_eventListeners","matchesSelector","getData","delegate","addChild","delChild","setContent","setHTML","getPosition","realLeft","realTop","appendHTML","html","parent","startLoading","stopLoading","eval_inner_JS","extend","setOpacity","findFirstClass"];
var _6c8=sys.modules["XN.effect"];
function getDom(str){
var tmp=document.createElement("div");
tmp.style.display="none";
document.body.appendChild(tmp);
tmp.innerHTML=str;
var dom=document.createElement("div");
while(tmp.firstChild){
dom.appendChild(tmp.firstChild);
}
tmp.parentNode.removeChild(tmp);
return dom;
}
var t=document.createElement("div");
t.innerHTML="<TEST_TAG></TEST_TAG>";
var _6cd=t.firstChild===null;
this.clear=function(_6ce){
_6ce=_6c3.$(_6ce);
_6ce.innerHTML="";
return _6ce;
};
this.hover=function(_6cf,_6d0,_6d1){
_6cf=_6c3.$(_6cf);
_6d1=_6d1?_6c3.$(_6d1):_6cf;
var _6d2=sys.modules["XN.event"];
if(_6d2){
_6d2.addEvent(_6cf,"mouseover",function(){
_6d1.addClass(_6d0);
},false);
_6d2.addEvent(_6cf,"mouseleave",function(){
_6d1.delClass(_6d0);
},false);
}else{
throw new Error("\u8bf7\u5148\u5bfc\u5165XN.event\u6a21\u5757\uff0c\u518d\u4f7f\u7528XN.event.addEvent");
}
return _6cf;
};
this.scrollTo=function(_6d3,_6d4){
_6d3=_6c3.$(_6d3);
if(!_6c8){
_6d4="normal";
}
switch(_6d4){
case "slow":
XN.effect.scrollTo(_6d3);
break;
default:
window.scrollTo(0,_6d3.realTop());
break;
}
return _6d3;
};
this.visible=function(_6d5){
_6d5=_6c3.$(_6d5);
return _6d5.style.display!="none"&&_6d5.style.visibility!="hidden";
};
this.toggleClass=function(_6d6,_6d7,_6d8){
if(XN.isUndefined(_6d8)){
if(_6c3.hasClassName(_6d6,_6d7)){
_6c3.delClass(_6d6,_6d7);
}else{
_6c3.addClass(_6d6,_6d7);
}
}else{
if(_6c3.hasClassName(_6d6,_6d7)){
_6c3.delClass(_6d6,_6d7);
_6c3.addClass(_6d6,_6d8);
}else{
_6c3.addClass(_6d6,_6d7);
_6c3.delClass(_6d6,_6d8);
}
}
return _6c3.$(_6d6);
};
this.toggleText=function(_6d9,_6da,_6db){
if(_6d9.innerHTML==_6da){
_6d9.innerHTML=_6db;
}else{
_6d9.innerHTML=_6da;
}
};
this.hasClassName=function(_6dc,_6dd){
return new RegExp("(^|\\s+)"+_6dd+"(\\s+|$)").test(_6c3.$(_6dc).className);
};
this.addClass=function(_6de,_6df){
_6de=_6c3.$(_6de);
if(_6c3.hasClassName(_6de,_6df)){
return _6de;
}
_6de.className+=" "+_6df;
return _6de;
};
this.delClass=function(_6e0,_6e1){
_6e0=_6c3.$(_6e0);
_6e0.className=_6e0.className.replace(new RegExp("(^|\\s+)"+_6e1+"(\\s+|$)","g")," ");
return _6e0;
};
this.show=function(_6e2,_6e3){
_6e2=_6c3.$(_6e2);
if(_6e2.style.display!="none"){
return;
}
if(!_6c8||!_6e3){
_6e3="normal";
}
switch(_6e3){
case "normal":
_6e2.style.display="";
break;
case "fade":
XN.effect.fadeIn(_6e2,function(e){
e.style.display="";
});
break;
case "slide":
XN.effect.slideOpen(_6e2);
break;
case "delay":
setTimeout(function(){
_6e2.style.display="";
},2000);
break;
}
return _6e2;
};
this.hide=function(_6e5,_6e6){
_6e5=_6c3.$(_6e5);
if(_6e5.style.display=="none"){
return;
}
if(!_6c8||!_6e6){
_6e6="normal";
}
switch(_6e6){
case "normal":
_6e5.style.display="none";
break;
case "fade":
XN.effect.fadeOut(_6e5,function(e){
e.style.display="none";
});
break;
case "slide":
XN.effect.slideClose(_6e5);
break;
case "delay":
setTimeout(function(){
_6e5.style.display="none";
},2000);
break;
}
return _6e5;
};
this.remove=function(_6e8){
var _6e8=_6c3.$(_6e8);
_6e8.parentNode.removeChild(_6e8);
return _6e8;
};
this.setStyle=function(_6e9,_6ea){
var _6e9=_6c3.$(_6e9);
_6e9.style.cssText+=";"+_6ea;
return _6e9;
};
this.getStyle=function(_6eb,_6ec){
_6eb=_6c3.$(_6eb);
_6ec=_6ec=="float"?"cssFloat":_6ec;
var _6ed=_6eb.style[_6ec];
if(!_6ed){
var css=document.defaultView.getComputedStyle(_6eb,null);
_6ed=css?css[_6ec]:null;
}
if(_6ec=="opacity"){
return _6ed?parseFloat(_6ed):1;
}
return _6ed=="auto"?null:_6ed;
};
this.addEvent=function(){
var _6ef=sys.modules["XN.event"];
if(_6ef){
_6ef.addEvent.apply(null,arguments);
}else{
throw new Error("\u8bf7\u5148\u5bfc\u5165XN.event\u6a21\u5757\uff0c\u518d\u4f7f\u7528XN.event.addEvent");
}
return arguments[0];
};
this.delEvent=function(){
var _6f0=sys.modules["XN.event"];
if(_6f0){
_6f0.delEvent.apply(null,arguments);
}else{
throw new Error("\u8bf7\u5148\u5bfc\u5165XN.event\u6a21\u5757\uff0c\u518d\u4f7f\u7528XN.event.delEvent");
}
return arguments[0];
};
this._eventListeners={};
this.matchesSelector=function(_6f1,_6f2){
return Sizzle.matches(_6f2,[_6f1]).length>0;
};
this.getData=function(_6f3,name){
return _6f3.getAttribute("data-"+name);
};
this.delegate=function(_6f5,_6f6,type,_6f8){
_6c3.$(_6f5).addEvent(type,function(e){
var ele=_6c3.$(e.target||e.srcElement);
do{
if(ele&&ele.matchesSelector(_6f6)){
_6f8.call(ele,e);
}
}while(ele=_6c3.$(ele.parentNode));
});
};
this.addChild=function(_6fb,_6fc){
_6fb=_6c3.$(_6fb);
if(XN.isString(_6fc)||XN.isNumber(_6fc)){
var _6fd=String(_6fc).charAt(0)=="#"?Sizzle(_6fc)[0]:_6fc;
if(XN.isString(_6fc)||XN.isNumber(_6fc)){
_6fb.innerHTML+=_6fd;
}else{
_6fb.appendChild(_6fd);
}
}else{
if(XN.isElement(_6fc)){
_6fb.appendChild(_6fc);
}else{
if(_6fc.iAmUIelement){
_6fb.appendChild(_6c3.$(_6fc.frame));
}else{
if(_6fc.iAmXmlhttp){
_6fc.fillTo=_6fb;
_6fb.startLoading();
}
}
}
}
return _6fb;
};
this.delChild=function(_6fe,_6ff){
_6ff=_6c3.$(_6ff);
_6ff.remove();
return _6c3.$(_6fe);
};
this.setContent=function(_700,c){
_700=_6c3.$(_700);
_700.innerHTML="";
_700.addChild(c);
return _700;
};
this.setHTML=function(_702,str){
if(_6cd){
_702.innerHTML="";
var _704=getDom(str);
while(_704.firstChild){
_702.appendChild(_704.firstChild);
}
}else{
_702.innerHTML=str;
}
};
this.getPosition=function(_705,_706){
_706=_6c3.$(_706)||document.body;
_705=_6c3.$(_705);
var rl=0;
var rt=0;
var p=_705;
try{
while(p&&p!=_706){
rl+=p.offsetLeft;
rt+=p.offsetTop;
p=p.offsetParent;
}
}
catch(e){
}
return {"left":rl,"top":rt};
};
this.realLeft=function(_70a,p){
return _6c3.getPosition(_70a,p||null).left;
};
this.realTop=function(_70c,p){
return _6c3.getPosition(_70c,p||null).top;
};
this.appendHTML=function(_70e,str,_710){
_70e=_6c3.$(_70e);
var f=document.createDocumentFragment();
var t=_6c3.$element("div");
t.innerHTML=str;
while(t.firstChild){
f.appendChild(t.firstChild);
}
var tmp=XN.array.build(f.childNodes);
_70e.appendChild(f);
if(_710){
return tmp;
}
return _70e;
};
this.html=function(_714,str){
_714.innerHTML=str;
};
this.parent=function(_716,_717){
while(_716){
_716=_6c3.$(_716.parentNode);
if(_716.matchesSelector(_717)){
return _716;
}
}
};
this.startLoading=function(_718,msg){
_718=_6c3.$(_718);
_718.innerHTML="<center><img src=\""+XN.env.staticRoot+"img/indicator.gif\" />"+(msg||"\u52a0\u8f7d\u4e2d...")+"</center>";
return _718;
};
this.stopLoading=function(_71a){
_71a=_6c3.$(_71a);
return _71a;
};
this.eval_inner_JS=function(el){
var js=_6c3.$(el).getElementsByTagName("script");
XN.array.each(js,function(i,s){
if(s.src){
XN.loadFile(s.src);
}else{
var _71f="__inner_js_out_put = [];\n";
_71f+=s.innerHTML.replace(/document\.write/g,"__inner_js_out_put.push");
eval(_71f);
if(__inner_js_out_put.length!==0){
var tmp=document.createDocumentFragment();
_6c3.$(tmp).appendHTML(__inner_js_out_put.join(""));
s.parentNode.insertBefore(tmp,s);
}
}
});
};
this.extend=function(_721){
var _722=_6c3.extend.cache;
for(var i=0,m,len=_6c7.length;i<len;i++){
m=_6c7[i];
if(_6c3[m]!=null&&!(m in _721)){
_721[m]=_722.findOrStore(_6c3[m]);
}
}
return _721;
};
this.extend.cache={findOrStore:function(_726){
return this[_726]=this[_726]||function(){
return _726.apply(null,[this].concat(XN.array.build(arguments)));
};
}};
if(_6c6.IE){
this.getStyle=function(_727,_728){
_727=_6c3.$(_727);
_728=(_728=="float"||_728=="cssFloat")?"styleFloat":_728;
var _729=_727.style[_728];
if(!_729&&_727.currentStyle){
_729=_727.currentStyle[_728];
}
if(_728=="opacity"){
if(_729=(_727.getStyle("filter")||"").match(/alpha\(opacity=(.*)\)/)){
if(_729[1]){
return parseFloat(_729[1])/100;
}
}
return 1;
}
if(_729=="auto"){
if((_728=="width"||_728=="height")&&(_727.getStyle("display")!="none")){
return _727["offset"+(_728=="width"?"Width":"Height")]+"px";
}
return null;
}
return _729;
};
}
if(document.addEventListener){
this.setOpacity=function(_72a,_72b){
_72a=_6c3.$(_72a);
_72a.style.opacity=_72b;
return _72a;
};
}else{
this.setOpacity=function(_72c,_72d){
_72c=_6c3.$(_72c);
_72c.style.zoom=1;
_72c.style.filter="Alpha(opacity="+Math.ceil(_72d*100)+")";
return _72c;
};
}
this.$element=function(tag){
return _6c3.$(document.createElement(tag));
};
this.$=function(id){
var _730;
if(id==null){
_730=null;
}else{
if(XN.isString(id)||XN.isNumber(id)){
_730=Sizzle("#"+id)[0];
}else{
_730=id;
}
}
if(_730){
_6c3.extend(_730);
}
return _730||null;
};
});
object.add("XN.template","XN.env",function(_731,XN){
this.smediaPlayer=function(o){
return ["<object classid=\"CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95\" width=\""+(o.width||"352")+"\" height=\""+(o.height||"70")+"\" >\n","<param name=\"autostart\" value=\""+(o.autostart||"1")+"\" >\n","<param name=\"showstatusbar\" value=\""+(o.showstatusbar||"1")+"\">\n","<param name=\"filename\" value=\""+o.filename+"\">\n","<embed type=\"application/x-oleobject\" codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\" ","flename=\"mp\"","autostart=\""+(o.autostart||"1")+"\" showstatusbar=\""+(o.showstatusbar||"1")+"\" ","src=\""+o.filename+"\" width=\""+(o.width||"352")+"\" height=\""+(o.height||"70")+"\"></embed>"].join("");
};
this.flashPlayer=function(o){
return "<embed src=\""+XN.env.staticRoot+"/swf/player.swf?url="+o.filename+"&Rwid="+(o.width||"450")+"&Autoplay="+(o.autostart||"1")+"\" wmode=\""+(o.wmode||"transparent")+"\" loop=\"false\" menu=\"false\" quality=\"high\" scale=\"noscale\" salign=\"lt\" bgcolor=\"#ffffff\" width=\""+(o.width||"450")+"\" height=\""+(o.height||"30")+"\" align=\"middle\" allowScriptAccess=\""+(o.allowScriptAccess||"sameDomain")+"\" allowFullScreen=\"false\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />";
};
this.flash=function(o){
return "&nbsp;<embed src=\""+o.filename+"\" type=\"application/x-shockwave-flash\" "+"width=\""+(o.width||"320")+"\" height=\""+(o.height||"240")+"\" allowFullScreen=\"true\" wmode=\""+(o.wmode||"transparent")+"\" allowNetworking=\""+(o.allowNetworking||"all")+"\" allowScriptAccess=\""+(o.allowScriptAccess||"sameDomain")+"\"></embed>";
};
});
object.add("XN.form","sys, XN, XN.event, XN.json, XN.array, XN.element, XN.string, XN.env",function(_736,sys,XN){
this.fillWithJSON=function(form,json){
form=XN.element.$(form);
_736.fillWithArray(form,XN.json.parse(json));
};
this.fillWithArray=function(form,a){
form=XN.element.$(form);
for(var p in a){
_736.Element.setValue(p,a[p],form);
}
};
this.setValue=function(_73e,_73f){
return _736.Element.setValue(_73e,_73f);
};
this.getValue=function(_740){
return _736.Element.getValue(_740);
};
this.serialize=function(form,type){
return _736.serializeElements(_736.getElements(form),type||"string");
};
this.serializeElements=function(_743,type,_745){
type=type||"array";
if(XN.isUndefined(_745)){
_745=false;
}
var data=[],_key,_748;
XN.array.each(_743,function(i,v){
if(!v.disabled&&v.name){
_key=v.name;
_748=_745?encodeURIComponent(_736.Element.getValue(v)):_736.Element.getValue(v);
if(_748!==null){
if(_key in data){
if(!XN.isArray(data[_key])){
data[_key]=[data[_key]];
}
data[_key].push(_748);
}else{
data[_key]=_748;
}
}
}
});
if(type=="array"){
return data;
}else{
if(type=="string"){
return XN.array.toQueryString(data);
}else{
if(type=="hash"){
var tmp={};
for(var p in data){
if(!XN.isFunction(data[p])){
tmp[p]=data[p];
}
}
return tmp;
}
}
}
};
this.getElements=function(form){
form=XN.element.$(form);
var _74e=[];
var all=form.getElementsByTagName("*");
XN.array.each(all,function(i,v){
if(!XN.isUndefined(_736.Element.Serializers[v.tagName.toLowerCase()])){
_74e.push(v);
}
});
return _74e;
};
this.Element={getValue:function(_752){
_752=XN.element.$(_752);
var _753=_752.tagName.toLowerCase();
return _736.Element.Serializers[_753](_752);
},setValue:function(_754,_755,form){
if(form){
_754=form[_754];
if((XN.isElement(_754)&&_754.tagName.toLowerCase()=="select")){
_736.Element.Serializers["select"](_754,_755);
}else{
if(XN.isElement(_754)){
_736.Element.Serializers[_754.tagName.toLowerCase()](_754,_755);
}else{
if(_754[0]){
var _757=_754[0].tagName.toLowerCase();
for(var i=0,j=_754.length;i<j;i++){
_736.Element.Serializers[_757](_754[i],(_755[i]||_755||""));
}
}
}
}
return _754;
}else{
_754=XN.element.$(_754);
var _757=_754.tagName.toLowerCase();
_736.Element.Serializers[_757](_754,_755);
return _754;
}
}};
this.Element.Serializers={input:function(_75a,_75b){
switch(_75a.type.toLowerCase()){
case "checkbox":
case "radio":
return _736.Element.Serializers.inputSelector(_75a,_75b);
default:
return _736.Element.Serializers.textarea(_75a,_75b);
}
},inputSelector:function(_75c,_75d){
if(XN.isUndefined(_75d)){
return _75c.checked?_75c.value:null;
}else{
_75c.checked=!!_75d;
}
},textarea:function(_75e,_75f){
if(XN.isUndefined(_75f)){
return _75e.value;
}else{
_75e.value=_75f;
}
},select:function(_760,_761){
if(XN.isUndefined(_761)){
return this[_760.type=="select-one"?"selectOne":"selectMany"](_760);
}else{
var opt,_763,_764=!XN.isArray(_761);
for(var i=0,_766=_760.length;i<_766;i++){
opt=_760.options[i];
_763=this.optionValue(opt);
if(_764){
if(_763==_761){
opt.selected=true;
return;
}
}else{
opt.selected=XN.array.include(_761,_763);
}
}
}
},selectOne:function(_767){
var _768=_767.selectedIndex;
return _768>=0?this.optionValue(_767.options[_768]):null;
},selectMany:function(_769){
var _76a=[],_76b=_769.length;
if(!_76b){
return null;
}
for(var i=0;i<_76b;i++){
var opt=_769.options[i];
if(opt.selected){
_76a.push(this.optionValue(opt));
}
}
return _76a;
},optionValue:function(opt){
return opt.value||opt.text;
}};
$F=function(id,type){
var el=XN.element.$(id);
if(el.tagName.toLowerCase()=="form"){
return _736.serialize(el,type);
}else{
return _736.getValue(el);
}
};
this._helper=function(el){
el=XN.element.$(el);
try{
if(el._helper){
return el._helper;
}
}
catch(e){
console.log(arguments.callee.caller);
}
el._helper=this;
this.element=el;
};
this._helper.prototype={maxSize:9999,limit:function(max,cut){
var This=this;
this.maxLength=max;
if(XN.isUndefined(cut)){
cut=true;
}
this._limit_cut=cut;
if(this._limit){
return this;
}
this._limit=true;
var el=this.element;
XN.event.addEvent(el,"focus",check);
XN.event.addEvent(el,"keyup",check);
function check(){
This.limitCheck();
}
return this;
},limitCheck:function(){
var This=this;
var el=this.element;
setTimeout(function(){
var v=el.value;
if(v.length>This.maxLength){
if(This._limit_cut){
el.value=v.substr(0,This.maxLength);
}
This.fireEvent("overmaxLength");
}else{
This.fireEvent("normalLength");
}
This.fireEvent("checkover");
},0);
},count:function(show,_77b){
if(this._count){
return this;
}
this._count=true;
var This=this,show=XN.element.$(show);
if(XN.isUndefined(_77b)){
_77b=true;
}
if(!this.maxLength){
_77b=false;
}
var el=this.element;
this.addEvent("overmaxLength",function(){
show.addClass("full");
});
this.addEvent("normalLength",function(){
show.delClass("full");
});
this.addEvent("checkover",update);
function update(){
show.innerHTML=el.value.length+(_77b?"/"+This.maxLength:"");
}
return this;
},countSize:function(show,max,_780){
return this.limit(max).count(show,_780);
},getRealValue:function(){
var el=this.element;
if(el.value==this._defaultValue||el.value==el.getAttribute("placeholder")){
return "";
}
return el.value;
},reloadDefaultValue:function(){
this.element.value=this._defaultValue;
this.element.style.color="#888";
},defaultValue:function(v){
var This=this;
var el=this.element;
v=v||el.value;
if(!XN.isUndefined(this._defaultValue)&&el.value==this._defaultValue){
el.value=v;
}
this._defaultValue=v;
if(this._default){
return this;
}
this._default=true;
if(document.activeElement!==el){
el.value=v;
}
el.style.color="#888";
XN.event.addEvent(el,"focus",function(){
if(el.value==This._defaultValue){
el.value="";
el.style.color="#333";
}
});
XN.event.addEvent(el,"blur",function(){
if(el.value==""){
el.value=This._defaultValue;
el.style.color="#888";
}
});
return this;
},focus:function(_785){
var el=this.element;
if(XN.isUndefined(_785)){
_785=el.value.length;
}
if(el.setSelectionRange){
el.focus();
el.setSelectionRange(el.value.length,_785);
}else{
if(el.createTextRange){
var _787=el.createTextRange();
_787.moveStart("character",_785);
_787.collapse(true);
_787.select();
el.focus();
}else{
el.focus();
}
}
return this;
},onEnter:function(_788){
var el=this.element;
var _78a=el.tagName.toLowerCase()=="textarea";
XN.event.addEvent(el,"keydown",function(e){
e=e||window.event;
if(e.keyCode==13){
if(_78a&&!e.ctrlKey){
return false;
}
XN.event.stop(e);
_788(el);
return false;
}
},false);
return this;
},onEsc:function(_78c){
var el=this.element;
XN.event.addEvent(el,"keydown",function(e){
e=e||window.event;
if(e.keyCode==27){
XN.event.stop(e);
_78c(el);
return false;
}
},false);
return this;
},autoResize:function(min,max){
var This=this,el=this.element,type;
this.minSize=min||this.minSize;
this.maxSize=max||this.maxSize;
if(el.tagName.toLowerCase()=="textarea"){
this.resizeType="height";
}else{
this.resizeType="width";
}
if(!_736.inputShadow){
var d=XN.element.$element("div");
d.setStyle("position:absolute;left:-99999px;top:-99999px");
document.body.appendChild(d);
_736.inputShadow=d;
}
this.shadow=_736.inputShadow;
setTimeout(function(){
if(min){
return;
}
This.minSize=type=="width"?el.offsetWidth:el.offsetHeight;
},10);
el.style.overflow="hidden";
XN.event.addEvent(el,"focus",function(){
This.timer=setInterval(This._resize.bind(This),200);
});
XN.event.addEvent(el,"blur",function(){
clearInterval(This.timer);
This.timer=null;
});
return this;
},_resize:function(){
var el=this.element,sh=this.shadow,oh,type=this.resizeType;
sh.style.fontSize=el.getStyle("fontSize");
var fs=parseInt(el.getStyle("fontSize"),0);
sh.style.fontFamily=el.getStyle("fontFamily");
(type=="width")?sh.style.height=el.offsetHeight:sh.style.width=el.offsetWidth;
sh.innerHTML=XN.string.escapeHTML(el.value).replace(/\r\n/mg,"<br>").replace(/\r/mg,"<br>").replace(/\n/mg,"<br>");
(type=="width")?oh=sh.offsetWidth:oh=sh.offsetHeight+fs+3;
if(oh>this.minSize&&oh<this.maxSize){
el.style[type]=oh+"px";
}else{
if(oh<this.minSize){
el.style[type]=this.minSize+"px";
}else{
if(oh>this.maxSize){
el.style[type]=this.maxSize+"px";
}
}
}
},cursorPosition:function(){
var _79a=this.element;
var _79b=0,end=0;
if(typeof (_79a.selectionStart)=="number"){
_79b=_79a.selectionStart;
end=_79a.selectionEnd;
}else{
if(document.selection){
var _79d=document.selection.createRange();
if(_79d.parentElement()==_79a){
var _79e=document.body.createTextRange();
_79e.moveToElementText(_79a);
for(_79b=0;_79e.compareEndPoints("StartToStart",_79d)<0;_79b++){
_79e.moveStart("character",1);
}
for(var i=0;i<=_79b;i++){
if(_79a.value.charAt(i)=="\n"){
_79b++;
}
}
var _79e=document.body.createTextRange();
_79e.moveToElementText(_79a);
for(end=0;_79e.compareEndPoints("StartToEnd",_79d)<0;end++){
_79e.moveStart("character",1);
}
for(var i=0;i<=end;i++){
if(_79a.value.charAt(i)=="\n"){
end++;
}
}
}
}
}
return {"start":_79b,"end":end,"item":[_79b,end]};
}};
this._helper.prototype.setDefaultValue=this._helper.prototype.defaultValue;
XN.event.enableCustomEvent(this._helper.prototype);
this.help=function(id){
return new _736._helper(id);
};
this.inputHelper=this.textAreaHelper=this.help;
$CursorPosition=function(el){
return _736.help(el).cursorPosition();
};
this.userInfoAutoComplete=function(id,type){
var _ui=sys.modules["XN.ui"];
if(_ui){
return _ui.userInfoAutoComplete(id,type);
}else{
throw new Error("\u8bf7\u5728use\u4e2d\u5bfc\u5165XN.ui\u6a21\u5757\uff0c\u624d\u53ef\u4f7f\u7528XN.form\u4e0b\u7684\u6b64\u65b9\u6cd5");
}
};
});
object.add("XN.effect","XN.func, XN.element, XN.event",function(_7a5,XN){
this.fadeIn=function(_7a7,_7a8){
if(_7a7.fadetimer){
return;
}
_7a8=_7a8||XN.func.empty;
var op=0;
_7a7.setOpacity(0);
_7a7.style.display="";
_7a7.fadetimer=setInterval(function(){
XN.element.setOpacity(_7a7,(op+=0.2));
if(op>=1){
clearInterval(_7a7.fadetimer);
_7a7.fadetimer=null;
_7a8(_7a7);
}
},60);
};
this.fadeOut=function(_7aa,_7ab){
if(_7aa.fadetimer){
return;
}
_7ab=_7ab||XN.func.empty;
var op=1;
_7aa.setOpacity(1);
_7aa.fadetimer=setInterval(function(){
XN.element.setOpacity(_7aa,(op-=0.2));
if(op<=0){
clearInterval(_7aa.fadetimer);
_7aa.fadetimer=null;
_7ab(_7aa);
_7aa.setOpacity(1);
}
},60);
};
this.gradient=function(_7ad,r,g,b,_7b1){
if(_7ad.gradientTimer){
return;
}
_7b1=_7b1||XN.func.empty;
_7ad.style.backgroundColor="#fff";
_7ad.style.backgroundColor="rgb("+r+","+g+","+b+")";
_7ad.gradientTimer=setInterval(function(){
b+=10;
_7ad.style.backgroundColor="rgb("+r+","+g+","+(b>255?255:b)+")";
if(b>255){
clearInterval(_7ad.gradientTimer);
_7ad.gradientTimer=null;
_7b1(_7ad);
}
},60);
};
this.slideOpen=function(_7b2){
if(_7b2.slidetimer){
return;
}
if(!_7b2.slideHeight){
var _7b3=_7b2.getStyle("position");
_7b2.setStyle("position:absolute;left:-99999px;top:-99999px;");
_7b2.show();
_7b2.slideHeight=_7b2.offsetHeight;
_7b2.hide();
_7b2.setStyle("position:"+_7b3+";left:auto;top:auto;");
}
var eh=_7b2.slideHeight,h=0;
var step=parseInt(eh/10);
_7b2.style.height="0px";
_7b2.style.display="";
_7b2.style.overflow="hidden";
_7b2.slidetimer=setInterval(function(){
_7b2.style.height=(h+=step)+"px";
if(h>=eh){
clearInterval(_7b2.slidetimer);
_7b2.slidetimer=null;
_7b2.style.height=eh;
_7b2.style.overflow=_7b2.slideOverflow;
}
},50);
};
this.slideClose=function(_7b7){
if(_7b7.slidetimer){
return;
}
var eh=_7b7.offsetHeight,h=eh;
_7b7.slideHeight=eh;
_7b7.slideOverflow=_7b7.getStyle("overflow");
_7b7.style.overflow="hidden";
var step=parseInt(eh/10);
_7b7.slidetimer=setInterval(function(){
_7b7.style.height=(h-=step)+"px";
if(h<=0){
clearInterval(_7b7.slidetimer);
_7b7.slidetimer=null;
_7b7.style.display="none";
_7b7.style.height=eh;
_7b7.style.overflow=_7b7.slideOverflow;
}
},50);
};
this.scrollTo=function(_7bb,_7bc,_7bd){
if(_7bb.scrolltimer){
return;
}
_7bc=_7bc||10;
_7bd=_7bd||XN.func.empty;
var d=_7bb.realTop();
var i=XN.event.winHeight();
var h=document.body.scrollHeight;
var a=XN.event.scrollTop();
var _7c2=null;
if(d>a){
if(d+_7bb.offsetHeight<i+a){
return;
}
_7bb.scrolltimer=setInterval(function(){
a+=Math.ceil((d-a)/_7bc)||1;
window.scrollTo(0,a);
if(a==d){
clearInterval(_7bb.scrolltimer);
_7bb.scrolltimer=null;
}
},10);
}else{
_7bb.scrolltimer=setInterval(function(){
a+=Math.ceil((d-a)/_7bc)||-1;
window.scrollTo(0,a);
if(a==d){
clearInterval(_7bb.scrolltimer);
_7bb.scrolltimer=null;
}
},10);
}
};
(function(_7c3){
var _7c4={linear:function(t,b,c,d){
return c*t/d+b;
},easeIn:function(t,b,c,d){
return c*(t/=d)*t+b;
},easeOut:function(t,b,c,d){
return -c*(t/=d)*(t-2)+b;
},easeBoth:function(t,b,c,d){
if((t/=d/2)<1){
return c/2*t*t+b;
}
return -c/2*((--t)*(t-2)-1)+b;
},easeInStrong:function(t,b,c,d){
return c*(t/=d)*t*t*t+b;
},easeOutStrong:function(t,b,c,d){
return -c*((t=t/d-1)*t*t*t-1)+b;
},easeBothStrong:function(t,b,c,d){
if((t/=d/2)<1){
return c/2*t*t*t*t+b;
}
return -c/2*((t-=2)*t*t*t-2)+b;
},elasticIn:function(t,b,c,d,a,p){
if(t===0){
return b;
}
if((t/=d)==1){
return b+c;
}
if(!p){
p=d*0.3;
}
if(!a||a<Math.abs(c)){
a=c;
var s=p/4;
}else{
var s=p/(2*Math.PI)*Math.asin(c/a);
}
return -(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;
},elasticOut:function(t,b,c,d,a,p){
if(t===0){
return b;
}
if((t/=d)==1){
return b+c;
}
if(!p){
p=d*0.3;
}
if(!a||a<Math.abs(c)){
a=c;
var s=p/4;
}else{
var s=p/(2*Math.PI)*Math.asin(c/a);
}
return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;
},elasticBoth:function(t,b,c,d,a,p){
if(t===0){
return b;
}
if((t/=d/2)==2){
return b+c;
}
if(!p){
p=d*(0.3*1.5);
}
if(!a||a<Math.abs(c)){
a=c;
var s=p/4;
}else{
var s=p/(2*Math.PI)*Math.asin(c/a);
}
if(t<1){
return -0.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;
}
return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*0.5+c+b;
},backIn:function(t,b,c,d,s){
if(typeof s=="undefined"){
s=1.70158;
}
return c*(t/=d)*t*((s+1)*t-s)+b;
},backOut:function(t,b,c,d,s){
if(typeof s=="undefined"){
s=1.70158;
}
return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;
},backBoth:function(t,b,c,d,s){
if(typeof s=="undefined"){
s=1.70158;
}
if((t/=d/2)<1){
return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;
}
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;
},bounceIn:function(t,b,c,d){
return c-_7c4["bounceOut"](d-t,0,c,d)+b;
},bounceOut:function(t,b,c,d){
if((t/=d)<(1/2.75)){
return c*(7.5625*t*t)+b;
}else{
if(t<(2/2.75)){
return c*(7.5625*(t-=(1.5/2.75))*t+0.75)+b;
}else{
if(t<(2.5/2.75)){
return c*(7.5625*(t-=(2.25/2.75))*t+0.9375)+b;
}
}
}
return c*(7.5625*(t-=(2.625/2.75))*t+0.984375)+b;
},bounceBoth:function(t,b,c,d){
if(t<d/2){
return _7c4["bounceIn"](t*2,0,c,d)*0.5+b;
}
return _7c4["bounceOut"](t*2-d,0,c,d)*0.5+c*0.5+b;
}};
var _811=function(){
_812(this.onTweening,this);
if(this.current>=this.frames){
this.stop();
_812(this.onComplete,this);
this.tweening=false;
return;
}
this.current++;
};
var _812=function(func,_814){
var args=Array.prototype.slice.call(arguments);
args=args.slice(2);
if(typeof func=="function"){
try{
return func.apply(_814||this,args);
}
catch(e){
_814.errors=_814.errors||[];
_814.errors.push(e);
}
}
};
_7c3.Motion=function(_816,_817){
this.duration=_817||1000;
this.tween=_816||"linear";
};
_7c3.Motion.getTweens=function(){
return _7c4;
};
_7c3.Motion.prototype={init:function(){
_812(this.onInit,this);
this.fps=this.fps||35;
this.frames=Math.ceil((this.duration/1000)*this.fps);
if(this.frames<1){
this.frames=1;
}
var f=("function"==typeof this.tween)?this.tween:_7c4[this.tween]||_7c4["linear"];
this.equation=function(from,to){
return f((this.current/this.frames)*this.duration,from,to-from,this.duration);
};
this.current=this.tweening=1;
},start:function(){
this.init();
_812(this.onStart,this);
var _81b=this,d=this.duration/this.frames;
this.timer=setInterval(function(){
_811.call(_81b);
},d);
},stop:function(){
if(this.timer){
clearInterval(this.timer);
}
this.tweening=false;
}};
})(_7a5);
});
object.add("XN.ui","XN, XN.array, XN.element, XN.event, XN.browser, XN.util, XN.dom, XN.func, XN.string, XN.env, XN.net, XN.json, XN.form, XN.datasource",function(_81d,XN){
(function(){
_81d.element={frame:null,iAmUIelement:true};
XN.array.each(["addClass","delClass","show","hide","remove"],function(i,v){
_81d.element[v]=function(){
XN.element[v].apply(null,[this.frame].concat(XN.array.build(arguments)));
};
});
_81d.container={container:null};
XN.array.each(["addChild","delChild","setContent"],function(i,v){
_81d.container[v]=function(){
XN.element[v].apply(null,[this.container].concat(XN.array.build(arguments)));
};
});
XN.$extend(_81d.container,_81d.element);
})();
this.Element=this.element;
this.Content=this.container;
(function(ns){
var UI=_81d;
var _825=XN.event.addEvent;
var _826=true;
function log(s){
if(_826){
XN.log(XN.isString(s)?"xn.ui.button:"+s:s);
}
}
ns.button=function(_828){
XN.$extend(this,_828);
this.init();
};
ns.button.prototype=XN.$extend({},UI.Element);
ns.button.prototype.text=null;
ns.button.prototype.className="";
ns.button.prototype.disableClassName="gray";
ns.button.prototype.init=function(){
var This=this;
var el;
if(this.getConfig("el")){
el=XN.element.$(this.getConfig("el"));
}else{
el=XN.element.$element("input");
}
this.frame=el;
el.type="button";
this.addClass("input-submit");
this.addClass(this.getConfig("className"));
this.setText(this.getConfig("text"));
_825(el,"click",function(){
if(This.onclick){
This.onclick();
}
},false);
};
ns.button.prototype.getConfig=function(key){
if(key=="el"){
return this.id;
}
return this[key];
};
ns.button.prototype.getEl=function(){
return this.frame;
};
ns.button.prototype.setText=function(text){
this.text=text;
this.getEl().value=text;
};
ns.button.prototype.disable=function(){
var el=this.getEl();
el.blur();
el.disabled=true;
el.addClass(this.getConfig("disableClassName"));
};
ns.button.prototype.enable=function(){
var el=this.getEl();
el.disabled=false;
el.delClass(this.getConfig("disableClassName"));
};
ns.button.prototype.focus=function(){
this.getEl().focus();
};
ns.button.prototype.blur=function(){
this.getEl().blur();
};
})(this);
(function(){
var rl="realLeft",rt="realTop",ow="offsetWidth",oh="offsetHeight";
_81d.fixPositionMethods={"1-1":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+"px";
f.style.top=y+el[rt]()-p[rt]()+"px";
},"1-2":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()-f[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()+"px";
},"1-3":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()-f[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()-f[oh]+"px";
},"1-4":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+"px";
f.style.top=y+el[rt]()-p[rt]()-f[oh]+"px";
},"2-1":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+el[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()+"px";
},"2-2":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+el[ow]-f[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()+"px";
},"2-3":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+el[ow]-f[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()-f[oh]+"px";
},"2-4":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+el[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()-f[oh]+"px";
},"3-1":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+el[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()+el[oh]+"px";
},"3-2":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+el[ow]-f[ow]+"px";
f.style.top=y+el[rt]()+el[oh]+"px";
},"3-3":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+el[ow]-f[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()+el[oh]-f[oh]+"px";
},"3-4":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+el[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()+el[oh]-f[oh]+"px";
},"4-1":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+"px";
f.style.top=y+el[rt]()-p[rt]()+el[oh]+"px";
},"4-2":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()-f[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()+el[oh]+"px";
},"4-3":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()-f[ow]+"px";
f.style.top=y+el[rt]()-p[rt]()+el[oh]-f[oh]+"px";
},"4-4":function(f,el,x,y,p){
f.style.left=x+el[rl]()-p[rl]()+"px";
f.style.top=y+el[rt]()-p[rt]()+el[oh]-f[oh]+"px";
}};
})();
this.fixPositionElement=function(_883){
var This=this;
this.config={tagName:"div",useIframeInIE6:true};
XN.$extend(this.config,_883);
var f,x,y;
if(this.getConfig("id")){
this.frame=f=XN.element.$(this.getConfig("id"));
x=f.realLeft();
y=f.realTop();
}else{
if(this.getConfig("tagName")){
this.frame=this.container=f=XN.element.$element(this.getConfig("tagName"));
}else{
return;
}
}
this.container=XN.element.$element("div");
this.frame.appendChild(this.container);
XN.array.each(["alignWith","alignType","offsetX","offsetY","alignParent"],function(i,v){
This[v]=This.getConfig(v)||This[v];
});
XN.element.setStyle(f,"position:absolute;z-index:10001;left:-9999px;top:-9999px");
if(!XN.element.$(this.alignParent)){
this.alignParent=XN.element.$(document.body);
}
XN.element.$(this.alignParent).appendChild(this.frame);
if((XN.browser.IE6&&this.getConfig("useIframeInIE6"))||this.getConfig("addIframe")){
var _88a;
this._iframe=_88a=XN.element.$element("iframe");
_88a.frameBorder=0;
_88a.scrolling="no";
_88a.setStyle("position:absolute;border:0px;left:0px;top:0px;z-index:-1;");
if(XN.browser.Gecko){
_88a.setAttribute("style","position:absolute;border:0px;left:0px;top:0px;z-index:-1;");
}
if(XN.browser.IE){
_88a.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";
}
this.frame.appendChild(_88a);
}
if(XN.element.visible(f)){
this.show();
}
f.style.display="block";
};
this.fixPositionElement.prototype=XN.$extend({},this.container);
XN.$extend(this.fixPositionElement.prototype,{alignWith:null,alignType:"4-1",offsetX:0,offsetY:0,alignParent:"dropmenuHolder",left:null,top:null,_isShow:false,getConfig:function(key){
return this.config[key];
},setOffsetX:function(x){
this.offsetX=x;
this.refresh();
return this;
},setOffsetY:function(y){
this.offsetY=y;
this.refresh();
return this;
},setAlignType:function(t){
this.alignType=t;
this.refresh();
return this;
},setAlignParent:function(p){
this.alignParent=p;
XN.element.$(this.alignParent).appendChild(this.frame);
this.refresh();
return this;
},refresh:function(){
if(this.visible()){
this.show();
}else{
this.hide();
}
return this;
},visible:function(){
return this._isShow;
},show:function(){
this._isShow=true;
this.frame.show();
if(this.alignWith){
this._moveToElement(this.alignWith);
}else{
var x=this.left===null?parseInt(((XN.element.$(this.alignParent).offsetWidth-this.frame.offsetWidth)/2),10):this.left;
var y=this.top===null?XN.event.scrollTop()+200:this.top;
this._moveToPosition(x,y);
}
if(this._iframe){
try{
this._iframe.style.height=this.frame.offsetHeight-2+"px";
this._iframe.style.width=this.frame.offsetWidth+"px";
}
catch(e){
}
}
return this;
},hide:function(){
this._isShow=false;
var f=this.frame;
f.style.left="-9999px";
f.style.top="-9999px";
return this;
},moveTo:function(x,y){
if(!x&&!y){
return;
}
if(XN.isNumber(x)){
this.left=x;
this.alignWith=null;
}else{
if(XN.isString(x)||XN.isElement(x)){
this.alignWith=XN.element.$(x);
}
}
if(XN.isNumber(y)){
this.top=y;
this.alignWith=null;
}
this.refresh();
return this;
},setX:function(x){
this.moveTo(x);
return this;
},setY:function(y){
this.moveTo(null,y);
return this;
},setIndex:function(i){
this.frame.style.zIndex=i;
return this;
},_moveToElement:function(el){
_81d.fixPositionMethods[this.alignType](this.frame,XN.element.$(el),this.offsetX,this.offsetY,XN.element.$(this.alignParent));
},_moveToPosition:function(x,y){
if(x){
this.frame.style.left=x+"px";
}
if(y){
this.frame.style.top=y+"px";
}
}});
(function(){
var _89b=_81d.fixPositionElement.prototype;
var _89c=XN.event;
var _89d=null;
_81d.clearDialog=function(){
if(_89d&&_89d.parent){
_89d.remove();
}
};
_81d.dialog=function(_89e){
var This=this;
_89d=this;
_81d.fixPositionElement.call(this,_89e);
this.container=XN.element.$element("div");
this.frame.appendChild(this.container);
if(this.getConfig("HTML")){
this.setContent(this.getConfig("HTML"));
}else{
this.setContent(this.buildHTML());
}
this.dialogContainer=XN.element.$("ui_dialog_container");
this.header=this.title=XN.element.$("ui_dialog_header");
this.body=this.msg=this.message=XN.element.$("ui_dialog_body");
this.footer=XN.element.$("ui_dialog_footer");
this.closeButton=XN.element.$("ui_dialog_close");
this.header.addChild=this.body.addChild=this.footer.addChild=function(s){
XN.element.addChild(this,s);
setTimeout(function(){
This.refresh();
},0);
};
this.dialogContainer.removeAttribute("id");
this.header.removeAttribute("id");
this.body.removeAttribute("id");
this.footer.removeAttribute("id");
this.closeButton.removeAttribute("id");
if(this.getConfig("showCloseButton")){
this.closeButton.show();
XN.event.addEvent(this.closeButton,"click",function(){
This.hide();
This.fireEvent("close");
});
}
this.frame.style.zIndex=10000;
this.setWidth(this.getConfig("width")||400);
if(this.getConfig("height")){
this.setHeight(this.getConfig("height"));
}
XN.array.each(["title","msg","message","header","body","footer"],function(i,v){
if(This.getConfig(v)){
This[v].setContent(This.getConfig(v));
}
});
if(this.getConfig("type")){
this.setType(this.getConfig("type"));
}
this._buttons=[];
XN.event.addEvent(this.footer,"click",function(e){
This._parseButtonEvent(e||window.event);
});
XN.util.hotKey.add("27",this._hotKeyEvent,this);
if(this.getConfig("modal")===true){
XN.dom.disable();
}
if(this.getConfig("noHeader")){
this.header.hide();
}
if(this.getConfig("noFooter")){
this.footer.hide();
}
if(this.getConfig("noPadding")){
this.body.addClass("no_padding");
}
};
_81d.dialog.prototype=XN.$extend({},_89b);
XN.$extend(_81d.dialog.prototype,{header:null,body:null,footer:null,_iframe:null,_buttons:null,buildHTML:function(){
return ["<table id=\"ui_dialog_container\" style=\"width: 100%; height: 100%;\" class=\"pop_dialog_table\">","<tbody>","<tr>","<td class=\"pop_topleft\"></td>","<td class=\"pop_border\"></td>","<td class=\"pop_topright\"></td>","</tr>","<tr>","<td class=\"pop_border\"></td>","<td class=\"pop_content\">","<h2><span id=\"ui_dialog_header\"></span><a style=\"display:none;\" class=\"close-button\" id=\"ui_dialog_close\" href=\"#nogo\" onclick=\"return false;\">\u5173\u95ed</a></h2>","<div class=\"dialog_content\">","<div id=\"ui_dialog_body\" class=\"dialog_body\"></div>","<div id=\"ui_dialog_footer\" class=\"dialog_buttons\"></div>","</div>","</td>","<td class=\"pop_border\"></td>","</tr>","<tr>","<td class=\"pop_bottomleft\"></td>","<td class=\"pop_border\"></td>","<td class=\"pop_bottomright\"></td>","</tr>","</tbody>","</table>"].join("");
},getButton:function(text){
var _8a5=this._buttons;
for(var i=_8a5.length-1;i>=0;i--){
if(_8a5[i].text==text){
return _8a5[i];
}
}
return null;
},addButton:function(b){
var o={text:b.text,_onclickForDialog:b.onclick};
if(b.className){
o.className=b.className;
}
var _8a9=new _81d.button(o);
_8a9.frame.setAttribute("dialog","1");
this._buttons.push(_8a9);
this.footer.addChild(_8a9);
return this;
},delButton:function(b){
if(XN.isString(b)){
b=this.getButton(b);
}
this.footer.delChild(b);
return this;
},_preventHide:false,preventHide:function(){
this._preventHide=true;
return this;
},setAutoHide:function(boo){
this._preventHide=!boo;
return this;
},_parseButtonEvent:function(e){
var el=_89c.element(e);
if(el.tagName.toLowerCase()!=="input"||el.type!=="button"){
return;
}
if(!el.getAttribute("dialog")){
return;
}
var _8ae=this.getButton(el.value);
if(_8ae&&_8ae._onclickForDialog){
_8ae._onclickForDialog.call(this);
}
if(this._preventHide){
this._preventHide=true;
}else{
this.hide();
}
},_hotKeyEvent:function(){
this.hide();
},setType:function(t){
if(t=="normal"){
this.frame.delClass("errorDialog");
}else{
if(t=="error"){
this.frame.addClass("errorDialog");
}
}
return this;
},setWidth:function(w){
if(!w){
return this;
}
if(w=="auto"){
this.frame.style.width="auto";
this.dialogContainer.style.height="";
this.dialogContainer.style.width="";
this.width=this.frame.offsetWidth;
}else{
this.width=w;
this.frame.style.width=w+"px";
this.dialogContainer.style.height="100%";
this.dialogContainer.style.width="100%";
}
this.refresh();
return this;
},setHeight:function(h){
if(!h){
return this;
}
this.hegith=h;
this.frame.style.height=h+"px";
this.refresh();
return this;
},resizeTo:function(w,h){
this.setWidth(w);
this.setHeight(h);
return this;
},clear:function(){
this.header.setContent("");
this.body.setContent("");
this.footer.setContent("");
this._buttons=[];
return this;
},setTitle:function(s){
this.header.setContent(s);
return this;
},setBody:function(s){
this.body.setContent(s);
return this;
},remove:function(_8b6){
XN.util.hotKey.del("27",this._hotKeyEvent);
_81d.element.remove.call(this);
if(!_8b6){
XN.dom.enable();
}
return this;
},refresh:function(){
if(this.visible()){
_89b.show.apply(this,arguments);
}else{
this.hide();
}
return this;
},reLocate:function(){
var w=this.frame;
var s=XN.event.scrollTop();
var _8b9=(XN.event.winHeight()-w.offsetHeight)/2;
_8b9=(_8b9<=0)?s:_8b9+s;
w.style.top=_8b9+"px";
},show:function(){
this._clearHideTimer();
if(this.getConfig("modal")===true){
XN.dom.disable();
}
_89b.show.apply(this,arguments);
this.fireEvent("show");
return this;
},hide:function(){
this._clearHideTimer();
_89b.hide.apply(this,arguments);
XN.dom.enable();
this.fireEvent("hide");
return this;
},_hideTimer:null,_clearHideTimer:function(){
if(this._hideTimer){
clearTimeout(this._hideTimer);
this._hideTimer=null;
}
},autoHide:function(t){
var This=this;
this._hideTimer=setTimeout(function(){
This.hide();
},t*1000);
return this;
}});
XN.event.enableCustomEvent(_81d.dialog.prototype);
})();
this.panel=this.dialog;
this.dialog.prototype.setHeader=function(h){
if(h&&h!==""){
this.header.addChild(h);
}else{
this.header.innerHTML="";
}
};
this.dialog.prototype.setFooter=function(f){
if(f&&f!==""){
this.footer.addChild(f);
}else{
this.footer.innerHTML="";
}
};
this.menu=function(_8be){
var This=this;
this.config={alignType:"4-1",barOnshowClass:"",tagName:"div",disalbeButtonClickEvent:true,fireOn:"click",keep:0.2,useIframeInIE6:true,effectTime:50};
XN.$extend(this.config,_8be);
var _8c0;
if(this.getConfig("text")){
this.frame=_8c0=XN.element.$element(this.getConfig("tagName"));
_8c0.setContent(this.getConfig("text"));
}else{
if(this.getConfig("button")){
this.frame=_8c0=XN.element.$(this.getConfig("button"));
}else{
return false;
}
}
this._alignType=this.getConfig("alignType");
if(this.getConfig("menu")){
XN.element.$(this.getConfig("menu")).hide();
this.menu=new _81d.fixPositionElement({id:this.getConfig("menu"),alignType:this._alignType,alignWith:this.getConfig("alignWith")||this.frame,addIframe:this.getConfig("addIframe"),useIframeInIE6:this.getConfig("useIframeInIE6")});
this.container=this.menu.frame;
this._canAddSubMenu=false;
}else{
var dt=XN.element.$element("div");
dt.hide();
this.menu=new _81d.fixPositionElement({id:dt,alignType:this._alignType,alignWith:this.getConfig("alignWith")||this.frame,addIframe:this.getConfig("addIframe"),useIframeInIE6:this.getConfig("useIframeInIE6")});
this.container=XN.element.$element("div");
this._menu.setContent(this.container);
}
this.menu.setIndex(10001);
XN.event.addEvent(this.menu.frame,"click",function(e){
e=e||window.event;
This._frameOnClick(e);
},false);
this.menu.setOffsetX(this.getConfig("offsetX")||0);
this.menu.setOffsetY(this.getConfig("offsetY")||0);
var _8c3=this.getConfig("event");
if(_8c3=="click"){
XN.event.addEvent(this.frame,"click",function(e){
This._buttonClick(e||window.event);
});
XN.event.addEvent(document,"click",function(e){
This._documentClick(e||window.event);
});
}else{
if(_8c3=="mouseover"){
XN.event.addEvent(this.frame,"mouseover",function(e){
This._frameMouseOver(e||window.event);
});
if(this.getConfig("disalbeButtonClickEvent")){
XN.event.addEvent(this.frame,"onclick",function(e){
XN.event.stop(e||window.event);
});
}
XN.event.addEvent(this.frame,"mouseleave",function(){
This._buttonMouseLeave();
});
XN.event.addEvent(this.menu.frame,"mouseleave",function(){
This._menuMouseLeave();
});
XN.event.addEvent(this.menu.frame,"mouseover",function(){
This._mouseOverMenu=true;
});
}else{
if(_8c3=="manual"){
}
}
}
XN.event.addEvent(window,"resize",function(){
This.menu.refresh();
});
this.hide();
};
this.menu.prototype=XN.$extend({},this.container);
XN.$extend(this.menu.prototype,{isShow:true,menu:null,_alignType:null,_button:null,_canAddSubMenu:true,_delayTimer:null,_mouseOverMenu:false,_mouseOverButton:false,_clearTimer:function(){
if(this._delayTimer){
clearTimeout(this._delayTimer);
this._delayTimer=null;
}
},_buttonClick:function(e){
XN.event.stop(e);
if(this.isShow){
this.hide();
}else{
this.show();
}
},_documentClick:function(e){
this.hide();
},_frameOnClick:function(e){
var This=this;
var el=XN.event.element(e);
var tag=el.tagName.toLowerCase();
if(tag=="a"){
return true;
}
if((tag=="input"&&(el.type=="radio"||el.type=="checkbox"))||tag=="label"){
this.isShow=false;
setTimeout(function(){
This.isShow=true;
},20);
return true;
}
while(el!=this.menu.frame&&el.tagName&&el.tagName.toLowerCase()!="a"){
el=el.parentNode;
}
if(el.tagName.toLowerCase()=="a"){
return true;
}
XN.event.stop(e);
},_frameMouseOver:function(e){
var This=this;
this._mouseOverButton=true;
this._clearTimer();
var _8d0=this.getConfig("delay");
if(_8d0){
this._delayTimer=setTimeout(function(){
if(This._mouseOverButton){
This.show();
}
},_8d0*1000);
}else{
This.show();
}
XN.event.stop(e);
},_buttonMouseLeave:function(){
var This=this;
this._mouseOverButton=false;
this._clearTimer();
setTimeout(function(){
if(!This._mouseOverMenu){
This.hide();
}
},this.getConfig("effectTime"));
},_menuMouseLeave:function(){
var This=this;
this._mouseOverMenu=false;
this._clearTimer();
setTimeout(function(){
if(!This._mouseOverButton){
This.hide();
}
},this.getConfig("effectTime"));
},getConfig:function(key){
var _8d4={"hoverClass":"barOnshowClass","event":"fireOn","button":"bar","delay":"keep"};
if(_8d4[key]){
return this.config[key]||this.config[_8d4[key]];
}
return this.config[key];
},show:function(){
if(this.isShow){
return this;
}
this.menu.show();
var _8d5=this.getConfig("hoverClass");
if(_8d5!=""){
this.frame.addClass(this.getConfig("hoverClass"));
}
this.onShow();
this.isShow=true;
return this;
},setWidth:function(w){
this.menu.frame.style.width=w+"px";
this.menu.refresh();
return this;
},hide:function(){
if(!this.isShow){
return this;
}
this.menu.hide();
this.frame.delClass(this.getConfig("hoverClass"));
this.isShow=false;
this.onHide();
return this;
},refresh:function(){
if(this.isShow){
this.menu.show();
}
return this;
},onShow:XN.func.empty,onHide:XN.func.empty});
XN.event.enableCustomEvent(this.menu.prototype);
this.autoComplete=function(p){
var This=this;
this.config=this.config||{};
XN.$extend(this.config,{inputTip:null,searchDelay:0.2,DS:null,enableCache:true,maxCache:10});
XN.$extend(this.config,p);
if(this.getConfig("enableCache")){
this.cache=new XN.util.cache({cacheLength:this.getConfig("maxCache")});
}
if(this.getConfig("input")){
var _8d9=this.input=XN.element.$(this.getConfig("input"));
}else{
var _8d9=this.input=XN.element.$element("input");
_8d9.type="text";
_8d9.addClass("input-text");
}
this.frame=_8d9;
XN.event.addEvent(_8d9,"focus",function(e){
This._startCheck();
This.fireEvent("focus");
});
XN.event.addEvent(_8d9,"blur",function(e){
This._endCheck();
This.fireEvent("blur");
});
this.addEvent("focus",function(){
var v=this.input.value;
if(v==""||v==this.getConfig("inputTip")){
this.fireEvent("noinput");
}
});
this.addEvent("blur",function(){
this._lastInput=null;
});
XN.event.addEvent(_8d9,"click",function(e){
XN.event.stop(e||window.event);
});
XN.event.addEvent(_8d9,"keydown",function(e){
This._userInput=true;
e=e||window.event;
if(e.keyCode==13){
XN.event.stop(e);
}
This.fireEvent("keydown",e);
});
_8d9.setAttribute("AutoComplete","off");
this.DS=this.getConfig("DS");
};
this.autoComplete.prototype=XN.$extend({},this.element);
XN.$extend(this.autoComplete.prototype,{input:null,cache:null,_userInput:false,_lastInput:null,getConfig:function(key){
if(key=="input"){
return this.config["input"]||this.config["id"];
}
return this.config[key];
},_startCheck:function(){
var This=this;
this._inputTimer=setInterval(function(){
if(This._userInput){
This._userInput=false;
return;
}
This._checkInput();
},this.getConfig("searchDelay")*1000);
},_endCheck:function(){
clearInterval(this._inputTimer);
this._inputTimer=null;
},_checkInput:function(){
var This=this;
var cv=this.input.value;
if(XN.string.isBlank(cv)){
if(this._lastInput===""){
return;
}
this._lastInput="";
this.fireEvent("noinput");
return;
}
if(cv==this._lastInput){
return;
}
this._lastInput=cv;
this.fireEvent("searchbegin");
if(this.cache){
var _8e3=this.cache.get(cv);
if(_8e3){
this.fireEvent("searchover",_8e3);
return;
}
}
if(!this.DS){
XN.log("no ds");
this.fireEvent("NO_DS");
return;
}
this.DS.query(cv,function(r){
if(This.cache){
This.cache.add(cv,r);
}
This.fireEvent("searchover",r);
});
}});
XN.event.enableCustomEvent(this.autoComplete.prototype);
(function(){
var _8e5={};
getCompleteMenu=function(id){
return _8e5[id];
};
_81d.autoCompleteMenu=function(p){
var This=this;
this._MID=XN.util.createObjID();
_8e5[this._MID]=this;
this.config=this.config||{};
XN.$extend(this.config,{ulClassName:"",liClassName:"",liHoverClass:"m-autosug-hover",aClassName:"",noResult:"\u6ca1\u6709\u5339\u914d\u7ed3\u679c",dataLoading:"\u6b63\u5728\u52a0\u8f7d\u6570\u636e...",noInput:null,autoSelectFirst:false});
_81d.autoComplete.call(this,p);
var _8e9=this.input;
var m=XN.element.$element("div");
m.innerHTML=this.getConfig("wrapper")||this._wrapper();
this._menuList=m.firstChild;
this._ul=this._menuList.getElementsByTagName("ul")[0];
this.menu=new _81d.menu({button:_8e9,menu:this._menuList,fireOn:"manual"});
this.addEvent("keydown",this._inputOnkeydown);
XN.event.addEvent(this._ul,"mousedown",function(e){
This._menuOnclick(e||window.event);
});
XN.event.addEvent(_8e9,"blur",function(){
This.menu.hide();
});
this.menu.hide();
this.addEvent("noinput",function(){
var tip=this.getConfig("noInput");
if(!tip){
this.menu.hide();
return;
}
this._ul.innerHTML="<li>"+tip+"</li>";
this.menu.show();
});
this.addEvent("NO_DS",function(){
this._noDataShow();
});
this.addEvent("searchover",function(_8ed){
this._buildMenu(_8ed);
});
};
_81d.autoCompleteMenu.prototype=XN.$extend({},_81d.autoComplete.prototype);
XN.$extend(_81d.autoCompleteMenu.prototype,{menu:null,_menuList:null,_ul:null,_currentLi:null,_highlightMenuItem:function(li){
if(li==this._currentLi){
return;
}
var _8ef=this.getConfig("liHoverClass");
if(this._currentLi!==null){
XN.element.delClass(this._currentLi,_8ef);
}
XN.element.addClass(li,_8ef);
this._currentLi=li;
var aid=this._currentLi.getAttribute("aid");
if(aid){
this.fireEvent("highlight",this.result[parseInt(aid)]);
}
},_inputOnkeydown:function(_8f1){
var li;
if(_8f1.keyCode==13){
if(this.menu.isShow&&this._currentLi){
var aid=this._currentLi.getAttribute("aid");
if(aid){
this._selectMenuItem(parseInt(aid));
}
}
return false;
}
if(_8f1.keyCode==38){
if(this._currentLi&&this._currentLi.previousSibling){
li=this._currentLi.previousSibling;
}else{
li=this._ul.lastChild;
}
this._highlightMenuItem(li);
return false;
}
if(_8f1.keyCode==40){
if(this._currentLi&&this._currentLi.nextSibling){
li=this._currentLi.nextSibling;
}else{
li=this._ul.firstChild;
}
this._highlightMenuItem(li);
return false;
}
return true;
},_menuOnclick:function(_8f4){
var el=XN.event.element(_8f4);
while(el&&el.tagName&&el.tagName.toLowerCase()!=="li"){
el=el.parentNode;
}
if(!el||el.nodeType!==1||!el.getAttribute("aid")){
return false;
}
this._selectMenuItem(parseInt(el.getAttribute("aid")));
return false;
},_menuOnmouseover:function(_8f6){
var el=XN.event.element(_8f6);
if(el.parentNode==XN.element.$("dropmenuHolder")){
return;
}
while(el&&el.tagName&&el.tagName.toLowerCase()!=="li"){
el=el.parentNode;
}
if(!el||el.nodeType!==1||!el.getAttribute("aid")){
return false;
}
this._highlightMenuItem(el);
return false;
},_selectMenuItem:function(id){
this.menu.hide();
this.input.focus();
this.fireEvent("select",this.result[id]);
this._lastInput=this.input.value;
},_buildMenu:function(_8f9){
var This=this;
this.result=_8f9;
if(_8f9.length>0){
this.fireEvent("hasResult");
}
if(_8f9.length==0){
this.fireEvent("noResult");
var _8fb=this.getConfig("noResult");
if(XN.isFunction(_8fb)){
_8fb=_8fb.call(this);
}
this._ul.innerHTML="<li>"+_8fb+"</li>";
this.menu.show();
this._currentLi=null;
return;
}
var lis=[];
lis.push(this.firstMenuItem());
var len=_8f9.length-1;
XN.array.each(_8f9,function(i,v){
lis.push("<li onmouseover=\"getCompleteMenu("+This._MID+")._highlightMenuItem(this);\" aid=\""+i+"\">"+This.buildMenu(v)+"</li>");
});
lis.push(this.lastMenuItem());
this._ul.innerHTML=lis.join("");
if(this.getConfig("autoSelectFirst")){
this._highlightMenuItem(this._ul.firstChild);
}
this.menu.show();
},_noDataShow:function(){
var tip=this.getConfig("dataLoading");
this._ul.innerHTML="<li>"+tip+"</li>";
this.menu.show();
},firstMenuItem:function(){
return "";
},lastMenuItem:function(){
return "";
},buildMenu:function(r){
return "<li>"+r.name+"</li>";
},setMenuWidth:function(w){
this.menu.setWidth(w);
}});
_81d.autoCompleteMenu.prototype._wrapper=function(){
return ["<div class=\"m-autosug\">","<span class=\"x1\">","<span class=\"x1a\"></span>","</span>","<span class=\"x2\">","<span class=\"x2a\"></span>","</span>","<div class=\"m-autosug-minwidth\">","<div class=\"m-autosug-content\">","<ul></ul>","</div>","</div>","</div>"].join("");
};
})();
this.friendSelector=function(_903){
var This=this;
this.config=this.config||{};
XN.$extend(this.config,{getFriendsUrl:"http://browse."+XN.env.domain+"/getfriendsajax.do?s=1",url:"http://sg."+XN.env.domain+"/s/f",aurl:"http://friend."+XN.env.domain+"/friendsSelector.do",param:{}});
XN.$extend(this.config,_903.params);
if(XN.isUndefined(this.getConfig("page"))){
this.config["page"]=false;
}
_81d.autoCompleteMenu.call(this,_903);
this.addEvent("select",function(r){
this.input.value=r.name;
if(this.onSelectOne){
this.onSelectOne(r);
}
});
this.buildMenu=function(r){
return r.name;
};
this.addEvent("focus",function(){
if(this._ready){
return;
}
if(this._isLoading){
return;
}
this.loadFriends();
});
};
this.friendSelector.prototype=XN.$extend({},this.autoCompleteMenu.prototype);
XN.$extend(this.friendSelector.prototype,{_isLoading:false,_ready:false,isReady:function(){
return this._ready;
},isLoading:function(){
return this._isLoading;
},loadFriends:function(r){
if(this.isLoading()){
return;
}
this._isLoading=true;
var This=this;
var p={};
p["init"]=true;
p["uid"]=false;
p["uhead"]=false;
p["uname"]=false;
p["group"]=false;
p["net"]=false;
p["param"]=this.getConfig("param");
p["page"]=this.getConfig("page");
new XN.net.xmlhttp({useCache:true,url:this.getConfig("aurl"),method:"get",data:"p="+XN.json.build(p),onSuccess:function(r){
r=XN.json.parse(r.responseText);
This._onload(r);
}});
},_onload:function(r){
this.isLoading=false;
this._ready=true;
this.config.qkey=r.qkey;
this.DS=new XN.util.DS_friends({url:this.getConfig("url"),qkey:this.getConfig("qkey"),limit:this.getConfig("limit"),page:this.getConfig("page"),param:this.getConfig("param")});
this.DS.query=function(v,_90d){
var This=this;
try{
this._request.abort();
}
catch(e){
}
function parseDS_JSON(r){
r=r.responseText;
var pp;
try{
var rt=XN.JSON.parse(r);
if(This.rootKey&&rt[This.rootKey]){
pp=rt[This.rootKey];
}else{
pp=rt;
}
}
catch(e){
pp=[];
}
_90d(pp);
}
var _912=XN.json.parse(this.param);
this._request=new XN.net.xmlhttp({url:this.url,data:"q="+encodeURIComponent(v)+(!!this.limit?("&l="+this.limit):"")+(!!_912.friendId?("&friend="+_912.friendId):""),method:this.method,onSuccess:parseDS_JSON});
};
}});
this.friendSelectorSynchronous=function(a,b){
function s(id,ac,v){
if(XN.isObject(id)){
id=id.id;
}
if(v.isReady()){
try{
v[ac](id);
}
catch(e){
}
}else{
v.addEvent("load",function(){
try{
v[ac](id);
}
catch(e){
}
});
v.loadFriends();
}
}
a.addEvent("select",function(id){
s(id,"select",b);
});
a.addEvent("deselect",function(id){
s(id,"deselect",b);
});
b.addEvent("select",function(id){
s(id,"select",a);
});
b.addEvent("deselect",function(id){
s(id,"deselect",a);
});
};
(function(){
_81d.multiFriendSelector=function(_91c){
var This=this;
this._ID=XN.util.createObjID();
this.config=this.config||{};
XN.$extend(this.config,{inputName:"ids",nameInputName:"names",aurl:"http://friend."+XN.env.domain+"/friendsSelector.do",url:"http://sg."+XN.env.domain+"/s/f",initParam:{},param:{},noInput:false,maxNum:-1});
XN.$extend(this.config,_91c);
this.frame=XN.element.$element("div");
var div=XN.element.$element("div");
div.hide();
document.body.appendChild(div);
div.appendChild(this.frame);
this.frame.innerHTML=["<div id=\""+this.getID("friendsContainer")+"\" class=\"tokenizer friendAutoSelector\">","<span id=\""+this.getID("inputContainer")+"\" class=\"tokenizer_input\"><input id=\""+this.getID("input")+"\" type=\"text\" /></span>","</div>","<div class=\"float-right\" id=\""+this.getID("menu")+"\"></div>"].join("");
this.input=this.getEl("input");
this.menuContainer=this.getEl("menu");
XN.event.addEvent(this.getEl("friendsContainer"),"click",function(e){
This._parseClickEvent(e||window.event);
});
this.autoComplete=new _81d.friendSelector({id:this.input,inputTip:"\u8f93\u5165\u597d\u53cb\u59d3\u540d...",autoSelectFirst:true,url:this.getConfig("url"),param:this.getConfig("param")});
this.autoComplete.loadFriends=function(r){
if(this.isLoading()){
return;
}
this._isLoading=true;
var p={};
p["init"]=true;
p["uid"]=true;
p["uhead"]=false;
p["uname"]=true;
p["group"]=false;
p["net"]=false;
XN.$extend(p,This.getConfig("initParam"));
p["param"]=this.getConfig("param");
new XN.net.xmlhttp({useCache:true,url:this.getConfig("aurl"),method:This.getConfig("loadMethod")||"get",data:"p="+XN.json.build(p),onSuccess:function(r){
r=XN.json.parse(r.responseText);
This._allFriends=r.candidate;
This.fireEvent("load");
This.autoComplete._onload(r);
}});
};
this.autoComplete.buildMenu=function(r){
return "<p>"+r.name+"</p>";
};
this.autoComplete.setMenuWidth(129);
this.autoComplete.addEvent("keydown",function(e){
This._onInputKeydown(e);
});
this.autoComplete.addEvent("select",function(r){
XN.log(this.input);
this.input.value="";
This.selectFriend(r);
});
if(this.getConfig("noInput")){
this.input.hide();
}
this.fireEvent("init");
};
var _926=_81d.multiFriendSelector.prototype=XN.$extend({},_81d.element);
XN.$extend(_926,{isReady:function(){
return this.autoComplete.isReady();
},isLoading:function(){
return this.autoComplete.isLoading();
},loadFriends:function(){
this.autoComplete.loadFriends();
},getUserByID:function(id){
id=String(id);
var rt=null;
XN.array.each(this._allFriends,function(i,v){
if(String(v.id)==id){
rt=v;
return false;
}
});
return rt;
},getConfig:function(key){
if(key=="inputName"){
return this.config["idInputName"]||this.config["inputName"];
}
return this.config[key];
},getID:function(id){
return "mfs_"+this._ID+id;
},getFriendID:function(id){
return this.getID("friend_"+id);
},getFriendEl:function(id){
return XN.element.$(this.getFriendID(id));
},getEl:function(id){
return XN.element.$(this.getID(id));
},getFriendsNum:function(){
return this.getEl("friendsContainer").getElementsByTagName("a").length;
},getSelectedFriends:function(){
var rt=[];
var a=XN.array.build(this.getEl("friendsContainer").getElementsByTagName("a"));
XN.array.each(a,function(i,v){
rt.push(v.getAttribute("uid")+"");
});
return rt;
},reset:function(){
this.deselectAll();
},deselectAll:function(){
var els=XN.array.build(this.getEl("friendsContainer").getElementsByTagName("a"));
XN.array.each(els,function(i,v){
XN.element.remove(v);
});
this.fireEvent("deselectAll",this.getIds());
},selectFriends:function(fs){
var This=this;
XN.array.each(fs,function(i,v){
This.select(v);
});
},deselectFriends:function(fs){
var This=this;
XN.array.each(fs,function(i,v){
This.deselect(v);
});
},select:function(o){
if(XN.isUndefined(o)){
return;
}
XN.log("mfs select:");
XN.log(o);
var _940=this.getConfig("maxNum");
if(_940!==-1){
if(this.getFriendsNum()==_940){
this.fireEvent("overMaxNum",_940);
return;
}
}
if(XN.isString(o)||XN.isNumber(o)){
o={id:o,name:this.getUserByID(o).name};
}
if(this.getFriendEl(o.id)){
return;
}
this.getEl("friendsContainer").insertBefore(this.createFriendHTML(o.id,o.name),this.getEl("inputContainer"));
this.fireEvent("select",o.id);
},deselect:function(uid){
if(!this.getFriendEl(uid)){
return;
}
this.getFriendEl(uid).remove();
this.fireEvent("deselect",uid);
},_parseClickEvent:function(e){
var el=XN.event.element(e);
XN.event.stop(e);
if(el&&el.getAttribute("action")){
this.deselectFriend(el.getAttribute("uid"));
}
},createFriendHTML:function(uid,_945){
var a=XN.element.$element("a");
a.id=this.getFriendID(uid);
a.setAttribute("uid",uid);
a.href="#nogo";
a.className="token";
a.tabindex="-1";
a.innerHTML=["<span>\n<span>\n<span>\n<span>\n<input type=\"hidden\" value=\"",uid,"\" name=\"",this.getConfig("inputName"),"\" />\n","<input type=\"hidden\" value=\"",_945,"\" name=\"",this.getConfig("nameInputName"),"\" />\n",_945,"<span uid=\"",uid,"\" action=\"x\" class=\"x\" onmouseout=\"this.className='x'\" onmouseover=\"this.className='x_hover'\" >\n</span>\n</span>\n</span>\n</span>\n</span>"].join("");
return a;
},_onInputKeydown:function(_947){
var i=this.getEl("inputContainer"),pa=i.previousSibling,na=i.nextSibling,_94b=this.input,c=this.getEl("friendsContainer");
if(_947.keyCode==8&&this.input.value==""){
if(pa){
this.deselectFriend(pa.getAttribute("uid"));
}
return true;
}else{
if(_947.keyCode==37&&this.input.value==""){
if(pa&&pa.tagName.toLowerCase()=="a"){
i.parentNode.removeChild(i);
c.insertBefore(i,pa);
setTimeout(function(){
_94b.focus();
},0);
}
return true;
}else{
if(_947.keyCode==39&&this.input.value==""){
if(na&&na.tagName.toLowerCase()=="a"){
i.parentNode.removeChild(i);
XN.dom.insertAfter(i,na);
setTimeout(function(){
_94b.focus();
},0);
}
return true;
}
}
}
return false;
}});
XN.event.enableCustomEvent(_926);
_926.deSelectAll=_926.deselectAll;
_926.deSelectFriend=_926.deselectFriend=_926.deselect;
_926.selectFriend=_926.select;
_926.getSelectedFriendsID=_926.getSelectedFriends;
_926.getIds=_926.getSelectedFriends;
})();
this.friendSelectorWithMenu=function(p){
var _94e=new _81d.friendSelector(p);
var menu=new _81d.friendSelectorMenu({url:_94e.getConfig("url"),param:_94e.getConfig("param"),multi:false,alignType:p.alignType,offsetX:p.offsetX,offsetY:p.offsetY,initParam:p.initParam});
var div=XN.element.$element("div");
div.addChild(_94e);
div.addChild(menu);
_94e.frame=div;
_94e.addEvent("focus",function(){
menu.menu.hide();
});
menu.addEvent("select",function(p){
var This=this;
setTimeout(function(){
This.menu.hide();
},30);
_94e.fireEvent("select",this.getUserByID(p));
});
menu.menu.menu.setOffsetY(9);
return _94e;
};
this.multiFriendSelectorWithMenu=function(p){
var _954=new _81d.multiFriendSelector(p);
var menu=new _81d.friendSelectorMenu({url:_954.getConfig("url"),param:_954.getConfig("param"),multi:true,showSelectAllCheckbox:_954.getConfig("showSelectAllCheckbox")||false});
menu.addEvent("submit",function(){
menu.menu.hide();
});
_954.menuContainer.setContent(menu);
_81d.friendSelectorSynchronous(_954,menu);
return _954;
};
(function(ns){
var _957=false;
var _958=XN.event.addEvent;
var log=function(s){
if(_957){
XN.log(XN.isString(s)?"ui.tabView:"+s:s);
}
return s;
};
ns.tabView=function(_95b){
this.config={selectedClass:"select",event:"click",alwaysReload:false,mouseOverDelay:0.2};
XN.$extend(this.config,_95b);
this.init();
};
ns.tabView.prototype={_tabs:null,_currentTab:null,_idPre:null,_tabIndex:0,init:function(){
this._idPre=XN.util.createObjID();
this._tabs=[];
},getConfig:function(key){
if(key=="activeClass"){
return this.config["activeClass"]||this.config["selectedClass"];
}
return this.config[key];
},_getID:function(el){
if(el.nodeType&&el.nodeType==1){
return this._setID(el).id;
}
return el;
},_setID:function(el){
if(!el.id){
this._tabIndex++;
el.setAttribute("id","tabview_"+this._idPre+"_"+this._tabIndex);
}
return XN.element.$(el);
},_getTab:function(id){
log("_getTab start");
log("param:id");
log(id);
if(!id){
return log(id);
}
if(id.label){
return log(id);
}
var key=this._getID(id);
log("key:"+key);
var tabs=this._tabs;
log("all tabs");
log(tabs);
for(var i=tabs.length-1;i>=0;i--){
if(tabs[i].key==key){
log("_getTab end");
return log(tabs[i]);
}
}
log("_getTab end");
return log(null);
},getCurrentTab:function(){
return this._getTab(this._currentTab);
},setCurrentTab:function(tab,_964){
log("setCurrentTab start");
var oldC=this.getCurrentTab();
var nowC=this._getTab(tab);
log("old current:");
log(oldC);
log("now current:");
log(nowC);
if(oldC&&oldC.key==nowC.key&&!_964){
return;
}
if(oldC){
this._deactiveTab(oldC);
}
this._activeTab(nowC);
this._setCurrentTab(nowC);
log("setCurrentTab end");
this.fireEvent("change",nowC);
return this;
},reset:function(){
var tab=this.getCurrentTab();
if(tab){
this._deactiveTab(tab);
}
this._setCurrentTab(null);
return this;
},_activeTab:function(tab){
log("_activeTab:");
log(tab);
tab.getEl("label").addClass(this.getConfig("activeClass"));
if(tab.content){
tab.getEl("content").show();
}
tab.onActive(tab);
log("_activeTab end");
},_deactiveTab:function(tab){
if(tab.getEl("label")){
tab.getEl("label").delClass(this.getConfig("activeClass"));
}
if(tab.content){
tab.getEl("content").hide();
}
tab.onInactive(tab);
},_setCurrentTab:function(tab){
log("_setCurrentTab start");
tab=this._getTab(tab);
log("currentTab:");
log(tab);
this._currentTab=tab?tab.key:null;
log("this._currentTab");
log(this._currentTab);
log("_setCurrentTab end");
},addTab:function(t){
log("addTab start");
log("params:");
log(t);
var This=this;
var tab={onActive:XN.func.empty,onClick:XN.func.empty,onInactive:XN.func.empty,onInit:XN.func.empty,getEl:function(key){
return XN.element.$(this[key]);
},active:false};
t.label=this._setID(XN.element.$(t.label));
t.key=t.key||t.label.id;
if(t.content){
t.content=this._getID(t.content);
log("get content id:"+t.content);
}
XN.$extend(tab,t);
this._tabs.push(tab);
log("all tabs");
log(this._tabs);
if(tab.active&&this._currentTab===null){
if(tab.content){
tab.getEl("content").show();
}
tab.label.addClass(this.getConfig("activeClass"));
this._setCurrentTab(tab);
}else{
if(tab.content){
tab.getEl("content").hide();
}
}
var ev=this.getConfig("event");
if(ev=="click"){
_958(tab.label,"click",function(e){
e=e||window.event;
XN.event.stop(e);
This._eventHander(e,tab.label);
},false);
}else{
if(ev=="mouseover"){
var _971=true;
var _972=null;
_958(tab.label,"mouseover",function(e){
var el=this;
_971=true;
_972=setTimeout(function(){
if(!_971){
return;
}
e=e||window.event;
This._eventHander(e,tab.label);
},This.getConfig("mouseOverDelay")*1000);
},false);
_958(tab.label,"mouseleave",function(e){
_971=false;
if(_972){
clearTimeout(_972);
}
},false);
}
}
tab.onInit(tab);
log("addTab end");
return this;
},_eventHander:function(e,el){
log("on click,el:");
log(el);
log("get tab form by el:");
var tab=this._getTab(el);
if(this.getConfig("alwaysReload")){
this.setCurrentTab(tab,true);
}else{
this.setCurrentTab(tab);
}
tab.onClick(e,tab);
},refresh:function(){
this._activeTab(this.getCurrentTab());
return this;
},showTab:function(id,_97a){
this.setCurrentTab(id,_97a);
},hideAll:function(){
this.reset();
}};
XN.event.enableCustomEvent(ns.tabView.prototype);
})(this);
this.refreshAll=function(){
document.body.style.zoom=1.1;
document.body.style.zoom=1;
};
this.getHiddenDiv=function(){
if(!this._hiddenDiv){
this._hiddenDiv=XN.element.$element("div").hide();
document.body.appendChild(this._hiddenDiv);
}
return this._hiddenDiv;
};
this.friendSearchBar=function(p){
var _97c=XN.element.$(p.input);
var _97d=XN.element.$(p.submit||null);
var form=XN.element.$(p.form);
var tip=p.tip||"\u627e\u4eba...";
var _980=p.action||function(p){
if(p.type&&p.type=="PAGE"){
window.location.href="http://page."+XN.env.domain+"/"+p.id+"?from=opensearch";
}else{
window.location.href="http://www."+XN.env.domain+"/profile.do?id="+p.id+"&from=opensearch";
}
};
var _982=false;
(new XN.form.inputHelper(_97c)).setDefaultValue(tip).onEnter(function(el){
if(_982){
return;
}
if(!XN.string.isBlank(el.value)){
form.submit();
}
});
var _984=16;
var _985={id:_97c,noResult:function(){
return "\u641c\u7d22\""+this.input.value+"\"";
},limit:_984,params:p.params};
var _986=new _81d.friendSelector(_985);
_986.lastMenuItem=function(){
if(this.result.length==_984){
return "<li><p><a onmousedown=\"window.location.href=this.href\" href=\"http://friend."+XN.env.domain+"/myfriendlistx.do?qu="+this.input.value+"\">\u70b9\u51fb\u67e5\u770b\u66f4\u591a..</a></p></li>";
}else{
return "";
}
};
_986.setMenuWidth(_97c.offsetWidth);
_986.onSelectOne=function(p){
_982=true;
_980(p);
};
if(_97d){
_97d.onclick=function(){
if(_982){
return false;
}
var v=_97c.value;
if(v!=tip&&!XN.string.isBlank(v)){
form.submit();
return false;
}
if(_97d.tagName.toLowerCase()=="a"){
return true;
}else{
return false;
}
};
}
};
this.navSearchBar=function(p){
var _98a=XN.element.$(p.input);
var _98b=XN.element.$(p.submit||null);
var form=XN.element.$(p.form);
var tip=p.tip||"\u627e\u4eba...";
var _98e=p.action||function(p){
if(p.type&&p.type=="PAGE"){
window.location.href="http://page."+XN.env.domain+"/"+(p.id||p.uid)+"?from=opensearch";
}else{
window.location.href="http://www."+XN.env.domain+"/profile.do?id="+(p.id||p.uid)+"&from=opensearch";
}
};
var _990=false;
(new XN.form.inputHelper(_98a)).setDefaultValue(tip).onEnter(function(el){
if(_990){
return;
}
if(!XN.string.isBlank(el.value)){
form.submit();
}
});
var _992=7;
var _993={id:_98a,noResult:function(){
return "<a onmousedown=\"window.location.href=this.href\" href=\"http://browse."+XN.env.domain+"/searchEx.do?from=opensearchclick&q="+encodeURIComponent(this.input.value)+"\" title=\"\u641c\u7d22"+this.input.value+"\">\u641c\u7d22\""+this.input.value+"\"</a>";
},limit:_992,params:p.params,wrapper:["<div class=\"\">","<span class=\"x1\">","<span class=\"x1a\"></span>","</span>","<span class=\"x2\">","<span class=\"x2a\"></span>","</span>","<div class=\"m-autosug-minwidth\">","<div class=\"m-autosug-content\">","<ul class=\"search-Result\"></ul>","</div>","</div>","</div>"].join(""),url:"http://sg."+XN.env.domain+"/s/h"};
var _994=new _81d.friendSelector(_993);
_994.loadFriends=function(r){
if(this.isLoading()){
return;
}
this._isLoading=true;
var This=this;
this._onload();
};
_994._onload=function(){
this.isLoading=false;
this._ready=true;
this.DS=new XN.util.DS_friends({url:this.getConfig("url"),qkey:this.getConfig("qkey"),limit:this.getConfig("limit"),page:this.getConfig("page"),param:this.getConfig("param")});
this.DS.query=function(v,_998){
var This=this;
try{
this._request.abort();
}
catch(e){
}
function parseDS_JSON(r){
r=r.responseText;
var pp;
try{
var rt=XN.json.parse(r);
if(This.rootKey&&rt[This.rootKey]){
pp=rt[This.rootKey];
}else{
pp=rt;
}
}
catch(e){
pp=[];
}
_998(pp);
}
this._request=new XN.net.xmlhttp({url:this.url,data:"q="+encodeURIComponent(v)+"&l="+this.limit,method:this.method,onSuccess:parseDS_JSON});
};
};
_994.buildMenu=function(r){
return "<img src=\""+(r.head||r.uhead)+"\" width=\"50\" height=\"50\" alt=\""+(r.name||r.uname)+"\"/>"+"<strong>"+(r.name||r.uname)+"</strong>";
};
_994._noDataShow=function(){
var tip=this.getConfig("dataLoading");
this._ul.innerHTML="<li class=\"lookMore\">"+tip+"</li>";
this.menu.show();
};
_994._buildMenu=function(_99f){
var This=this;
this.result=_99f;
if(_99f.length==0){
var _9a1=this.getConfig("noResult");
if(XN.isFunction(_9a1)){
_9a1=_9a1.call(this);
}
this._ul.innerHTML="<li class=\"lookMore\">"+_9a1+"</li>";
this.menu.show();
this._currentLi=null;
return;
}
var lis=[];
lis.push(this.firstMenuItem());
var len=_99f.length-1;
XN.array.each(_99f,function(i,v){
lis.push("<li onmouseover=\"getCompleteMenu("+This._MID+")._highlightMenuItem(this);\" aid=\""+i+"\">"+This.buildMenu(v)+"</li>");
});
lis.push(this.lastMenuItem());
this._ul.innerHTML=lis.join("");
if(this.getConfig("autoSelectFirst")){
this._highlightMenuItem(this._ul.firstChild);
}
this.menu.show();
};
_994.lastMenuItem=function(){
if(this.result.length==_992){
return "<li class=\"lookMore\"><a onmousedown=\"window.location.href=this.href\" href=\"http://friend."+XN.env.domain+"/myfriendlistx.do?qu="+this.input.value+"\">\u70b9\u51fb\u67e5\u770b\u66f4\u591a..</a></li>";
}else{
return "";
}
};
_994.setMenuWidth(_98a.offsetWidth);
_994.onSelectOne=function(p){
_990=true;
_98e(p);
};
if(_98b){
_98b.onclick=function(){
if(_990){
return false;
}
var v=_98a.value;
if(v!=tip&&!XN.string.isBlank(v)){
form.submit();
return false;
}
if(_98b.tagName.toLowerCase()=="a"){
return true;
}else{
return false;
}
};
}
};
this.userInfoAutoComplete=function(id,type){
var _9aa={"elementaryschool":"http://www."+XN.env.domain+"/autocomplete_elementaryschool.jsp","juniorhighschool":"http://www."+XN.env.domain+"/autocomplete_juniorhighschool.jsp","workplace":"http://www."+XN.env.domain+"/autocomplete_workplace.jsp","highschool":"http://www."+XN.env.domain+"/autocomplete_highschool.jsp","allnetwork":"http://www."+XN.env.domain+"/autocomplete_all_network.jsp","allSchool":"http://www."+XN.env.domain+"/autocomplete-school.jsp","city":"http://www."+XN.env.domain+"/autocomplete-city.jsp","college":"http://www."+XN.env.domain+"/autocomplete_college.jsp"};
var ds=new XN.datasource.DS_XHR({url:_9aa[type]});
var at=new _81d.autoCompleteMenu({DS:ds,input:id});
at.buildMenu=function(r){
return "<p>"+(r.name||r.Name)+"</p>";
};
at.addEvent("select",function(r){
this.input.value=(r.name||r.Name);
});
return at;
};
});
object.add("XN.Do","XN, XN.func, XN.array, XN.ui",function(_9af,XN){
this.currentAlert=null;
this.currentConfirm=null;
this.alert=function(_9b1,_9b2,type,X,Y,w,h,_9b8){
var _9b9={type:"normal",width:400,button:"\u786e\u5b9a",modal:false,callBack:XN.func.empty,autoHide:0,addIframe:true,closeFire:true};
if(!XN.isString(_9b1)){
extendObject(_9b9,_9b1);
}else{
if(XN.isString(_9b1)||arguments.length>1){
var ars=arguments;
XN.array.each(["message","title","type","X","Y","width","height","callBack"],function(i,v){
if(ars[i]){
_9b9[v]=ars[i];
}
});
}
}
var temp=_9b9.params;
delete _9b9.params;
_9b9=extendObject({},_9b9,temp);
_9b9.callback=_9b9.callback||_9b9.callBack;
try{
_9af.currentAlert.remove(_9b9.modal===true);
}
catch(e){
}
var _9be=new XN.ui.dialog(_9b9).setType(_9b9.type).setTitle(_9b9.title||(_9b9.type=="error"?"\u9519\u8bef\u63d0\u793a":"\u63d0\u793a")).setWidth(_9b9.width).setHeight(_9b9.height).setX(_9b9.X).setY(_9b9.Y).addButton({text:(_9b9.yes||_9b9.button),onclick:function(){
_9be.setAutoHide(true);
return _9b9.callback.call(_9be);
}}).show();
if(_9b9.closeFire===true){
_9be.addEvent("close",function(){
_9b9.callback.call(_9be);
});
}
_9af.currentAlert=_9be;
try{
_9be.getButton(_9b9.button).focus();
}
catch(e){
}
if(_9b9.autoHide){
_9be.autoHide(_9b9.autoHide);
}
return _9be;
};
this.confirm=function(_9bf,_9c0,_9c1,yes,no,X,Y,w,h){
var _9c8={type:"normal",width:400,modal:false,yes:"\u786e\u5b9a",no:"\u53d6\u6d88",callBack:XN.func.empty,focus:null,addIframe:true,closeFire:false};
if(!XN.isString(_9bf)&&!XN.isNumber(_9bf)){
extendObject(_9c8,_9bf);
}else{
if(XN.isString(_9bf)||arguments.length>1){
var ars=arguments;
XN.array.each(["message","title","callBack","yes","no","X","Y","w","h"],function(i,v){
if(ars[i]){
_9c8[v]=ars[i];
}
});
}
}
var temp=_9c8.params;
delete _9c8.params;
_9c8=extendObject({},_9c8,temp);
_9c8.callback=_9c8.callback||_9c8.callBack;
try{
_9af.currentConfirm.remove(_9c8.modal===true);
}
catch(e){
}
var _9cd=new XN.ui.dialog(_9c8).setType(_9c8.type).setTitle(_9c8.title||(_9c8.type=="error"?"\u9519\u8bef\u63d0\u793a":"\u63d0\u793a")).setBody(_9c8.msg||_9c8.message||"").setWidth(_9c8.width).setHeight(_9c8.height).setX(_9c8.X).setY(_9c8.Y).addButton({text:(_9c8.submit||_9c8.yes),onclick:function(){
_9cd.setAutoHide(true);
return _9c8.callback.call(_9cd,true);
}}).addButton({text:(_9c8.cancel||_9c8.no),onclick:function(){
_9cd.setAutoHide(true);
return _9c8.callback.call(_9cd,false);
}}).show();
_9cd.getButton(_9c8.cancel||_9c8.no).addClass("gray");
if(_9c8.focus=="submit"){
_9c8.focus=_9c8.submit;
}else{
if(_9c8.focus=="cancel"){
_9c8.focus=_9c8.cancel;
}
}
if(_9c8.closeFire===true){
_9cd.addEvent("close",function(){
_9c8.callback.call(_9cd,false);
});
}
_9cd.getButton(_9c8.focus||_9c8.submit||_9c8.yes).focus();
_9af.currentConfirm=_9cd;
return _9cd;
};
this.showMessage=this.showMsg=function(msg,_9cf,time){
var _9d1=_9af.alert({msg:msg,title:(_9cf||"\u63d0\u793a"),noFooter:true,autoHide:(time||2)});
return _9d1;
};
this.showError=function(msg,_9d3,time){
var _9d5=_9af.alert({msg:msg,type:"error",title:(_9d3||"\u9519\u8bef\u63d0\u793a"),noFooter:true,autoHide:(time||2)});
return _9d5;
};
});
object.use(["XN","XN.array","XN.browser","XN.cookie","XN.Do","XN.dom","XN.effect","XN.element","XN.env","XN.event","XN.form","XN.func","XN.json","XN.net","XN.string","XN.template","XN.ui","XN.util","XN.datasource"],function(_9d6,XN){
$extend=XN.$extend;
if(window.XN==null){
window.XN=XN;
}else{
var _9d8=window.XN;
window.XN=XN;
for(var prop in _9d8){
if(window.XN[prop]===undefined){
window.XN[prop]=_9d8[prop];
}
}
XN.$extend(window.XN.env,_9d8.env);
}
isUndefined=XN.isUndefined;
isString=XN.isString;
isElement=XN.isElement;
isFunction=XN.isFunction;
isObject=XN.isObject;
isArray=XN.isArray;
isNumber=XN.isNumber;
$=XN.element.$;
$element=XN.element.$element;
XN.element.findFirstClass=XN.dom.findFirstClass;
extendObject=$extend;
xn_getEl=ge=getEl=$X=$;
$xElement=XN.element.$element;
XN.DEBUG=XN.Debug=XN.debug;
XN.debug.On=XN.debug.on;
XN.debug.Off=XN.debug.off;
XN.namespace("ui");
XN.namespace("util");
XN.namespace("app");
XN.namespace("page");
XN.APP=XN.App=XN.app;
XN.PAGE=XN.Page=XN.page;
XN.CONFIG=XN.Config=XN.config;
XN.ENV=XN.Env=XN.env=XN.env;
XN.ARRAY=XN.Array=XN.array=XN.array;
XN.String=XN.STRING=XN.string=XN.string;
XN.BROWSER=XN.Browser=XN.browser=XN.browser;
XN.COOKIE=XN.Cookie=XN.cookie=XN.cookie;
XN.EVENT=XN.Event=XN.event=XN.event;
XN.DO=XN.Do;
XN.DOM=XN.Dom=XN.dom=XN.dom;
XN.EFFECT=XN.Effect=XN.effect=XN.effect;
XN.ELEMENT=XN.Element=XN.element=XN.element;
XN.FORM=XN.Form=XN.form=XN.form;
XN.FUNC=XN.Func=XN.func=XN.func;
XN.JSON=XN.Json=XN.json=XN.json;
XN.NET=XN.Net=XN.net;
XN.Template=XN.TEMPLATE=XN.template=XN.template;
XN.UI=XN.Ui=XN.ui;
XN.UTIL=XN.Util=XN.util;
XN.ui.DS_JSON=XN.util.DS_JSON=XN.datasource.DS_JSON;
XN.ui.DS_friends=XN.util.DS_friends=XN.datasource.DS_friends;
XN.ui.DS_Array=XN.util.DS_Array=XN.datasource.DS_Array;
XN.ui.DS_XHR=XN.util.DS_XHR=XN.datasource.DS_XHR;
try{
document.domain=String(XN.env.domain);
}
catch(e){
}
if(window.isJSON==null){
window.isJSON=XN.string.isJSON;
}
if(XN.events==null){
XN.timeLog={};
XN.events={};
XN.event.enableCustomEvent(XN.events);
}
});
if(!window.console){
window.console={log:function(){
}};
}
if(!Function.prototype.bind){
Function.prototype.bind=function(_9da){
var _9db=this;
return function(){
_9db.apply(_9da,arguments);
};
};
}
window.now=new Date();
XN.dom.ready(function(){
if(XN.config.parentDomain||(!XN.config.jumpOut)){
return;
}
try{
top.location.href.indexOf("x");
}
catch(e){
try{
top.location=self.location;
}
catch(e){
}
}
});
function writepipe(uin,nick){
if(uin>0){
var s=GetCookie("_pipe");
if(s){
s+=":";
}
SetCookie("_pipe",s+uin+":"+escape(nick),null,"/",""+XN.env.domain+"");
}
var _9df=GetCookie("_wi");
if("opening"!=_9df&&"running"!=_9df){
SetCookie("_wi","opening",null,"/",XN.ENV.domain);
window.wiw=window.open("http://"+XN.env.domain+"/webpager.do?toid="+uin,"_blank","height=600,width=650,resizable=yes,location=yes");
if(window.wiw_checker){
window.clearInterval(window.wiw_checker);
}
window.wiw_checker=window.setInterval(function(){
if(window.wiw.closed){
window.clearInterval(window.wiw_checker);
SetCookie("_wi","",null,"/",XN.ENV.domain);
}
},1000);
return true;
}
if(window.wiw){
try{
wiw.focus();
}
catch(e){
}
}
return false;
}
function talkto(uin,nick,tiny,_9e3){
try{
var a=new ActiveXObject("xntalk.Application");
if(a){
a.openChat("",uin);
return true;
}
}
catch(e){
}
try{
if(top.frames["imengine"].gPagerType==4){
if(top.frames["imengine"].imHelper.isLoginUser()){
var tabs=top.frames["imengine"].imui.chatTabs;
tabs.onActivateWidget(uin,nick,tiny,_9e3);
tabs.switchFocus(uin);
return true;
}
}
}
catch(e){
}
}
function jump_and_download(link){
if(XN.BROWSER.IE){
window.open(link,"download_window","toolbar=0,location=no,directories=0,status=0,scrollbars=0,resizeable=0,width=1,height=1,top=0,left=0");
window.focus();
}
}
function GetCookieVal(_70){
var _71=document.cookie.indexOf(";",_70);
if(_71==-1){
_71=document.cookie.length;
}
return unescape(document.cookie.substring(_70,_71));
}
function GetCookie(_72){
var arg=_72+"=";
var _74=arg.length;
var _75=document.cookie.length;
var i=0;
while(i<_75){
var j=i+_74;
if(document.cookie.substring(i,j)==arg){
return GetCookieVal(j);
}
i=document.cookie.indexOf(" ",i)+1;
if(i==0){
break;
}
}
return null;
}
function SetCookie(_78,_79){
var _7a=SetCookie.arguments;
var _7b=SetCookie.arguments.length;
var _7c=(_7b>2)?_7a[2]:null;
var _7d=(_7b>3)?_7a[3]:null;
var _7e=(_7b>4)?_7a[4]:null;
var _7f=(_7b>5)?_7a[5]:false;
document.cookie=_78+"="+escape(_79)+((_7c==null)?"":("; expires="+_7c.toGMTString()))+((_7d==null)?"":("; path="+_7d))+((_7e==null)?"":("; domain="+_7e))+((_7f==true)?"; secure":"");
}
if(XN.browser.Gecko&&XN.string.getQuery("debug_mode")){
XN.debug.on();
}
(function(){
var _9f7=false;
window.load_jebe_ads=function(s,r,_9fa){
if(!s){
return;
}
if(_9f7&&!_9fa){
return;
}
_9f7=true;
XN.dom.ready(function(){
if(!r){
r=location.href;
}
if(r.match(/http:\/\/www\.renren\.com\/home/ig)){
r="http://www.renren.com/Home.do";
}
var p=XN.cookie.get("id");
if(!p||XN.string.isBlank(p)){
p="";
}
var src="http://ebp.renren.com/ebpn/show?userid="+encodeURIComponent(p)+"&isvip="+XN.user.isVip+"&hideads="+XN.user.hideAds+"&tt="+new Date().getTime();
if(XN.app.share&&XN.app.share.pageInfo){
r=r.replace(/\?.*$/,"")+"?shareType="+XN.app.share.pageInfo.type;
}
if(r){
src+="&r="+encodeURIComponent(r);
}
XN.loadFile({file:src,type:"js"},function(){
var _9fd="http://jebe.xnimg.cn/"+jebe_json.ad_js_version+"/xn.jebe.js";
XN.loadFile({file:_9fd,type:"js"});
});
});
};
})();
XN.USER=XN.user=currentUser={};
XN.USER.me=function(_9fe){
};
XN.event.enableCustomEvent(currentUser);
XN.USER.addFriendAction=function(p){
this.config={commentLength:45,needComment:true,requestURI:"http://friend."+XN.env.domain+"/ajax_request_friend.do"};
$extend(this.config,p);
};
XN.user.addFriendAction.prototype={getConfig:function(key){
return this.config[key];
},send:function(id,why,from,code,_a05){
var code=code!=1?0:1;
var _a05=_a05||"";
var This=this;
if(this.getConfig("needComment")){
if(XN.STRING.isBlank(why)){
this.fireEvent("checkError","\u60a8\u8f93\u5165\u7684\u4fe1\u606f\u4e0d\u80fd\u4e3a\u7a7a");
return;
}
}
if(why.length>this.getConfig("commentLength")){
this.fireEvent("checkError","\u60a8\u8f93\u5165\u7684\u4fe1\u606f\u4e0d\u80fd\u8d85\u8fc7"+this.getConfig("commentLength")+"\u4e2a\u5b57\u7b26");
return;
}
var data="id="+id+"&why="+why+"&codeFlag="+code+"&code="+_a05;
if(this.getConfig("matchmaker")){
data=data+"&matchmaker="+this.getConfig("matchmaker");
}
this.fireEvent("beforePost");
new XN.NET.xmlhttp({url:this.getConfig("requestURI")+"?from="+from,"data":data,onSuccess:function(r){
r=r.responseText;
if(r&&isJSON(r)){
var re=XN.JSON.parse(r);
}else{
This.fireEvent("error");
return;
}
if(re.result=="-1"){
This.fireEvent("flagError");
return;
}
This.fireEvent("success",id,r,from);
if(!window.currentUser){
return;
}
if(currentUser.fireEvent){
currentUser.fireEvent("addFriendSuccess",id,r,from);
}
if(currentUser.onaddFriendSuccess){
currentUser.onaddFriendSuccess(id,r);
}
},onError:function(){
This.fireEvent("error",id,from);
if(!window.currentUser){
return;
}
currentUser.fireEvent("addFriendError",id,r,from);
}});
}};
XN.EVENT.enableCustomEvent(XN.USER.addFriendAction.prototype);
XN.dynamicLoad({file:"http://s.xnimg.cn/jspro/xn.app.addFriend.js",funcs:["showRequestFriendDialog"]});
XN.DOM.readyDo(function(){
if(XN.get_check){
var _a0a=Sizzle("form");
for(var i=0;i<_a0a.length;i++){
var _a0c=document.createElement("input");
_a0c.type="hidden";
_a0c.name="requestToken";
_a0c.value=XN.get_check;
_a0a[i].appendChild(_a0c);
_a0c=document.createElement("input");
_a0c.type="hidden";
_a0c.name="_rtk";
_a0c.value=XN.get_check_x;
_a0a[i].appendChild(_a0c);
}
}
});
XN.namespace("widgets");
XN.WIDGETS=XN.Widgets=XN.widgets;
function fixImage(_a0d,_a0e,_a0f){
if(_a0d.width>_a0e){
_a0d.width=_a0e;
}
if(_a0d.height>_a0f){
_a0d.height=_a0f;
}
}
function clipImage(_a10){
if(!_a10.getAttribute("width")||!_a10.getAttribute("height")){
return;
}
var _a11=parseInt(_a10.getAttribute("width"));
var _a12=parseInt(_a10.getAttribute("height"));
if(_a10.naturalWidth&&_a10.naturalHeight&&_a10.naturalWidth==_a11&&_a10.naturalHeight==_a12){
return;
}
var _a13=new Image();
_a13.onload=function(){
if(_a13.width==_a11&&_a13.height==_a12){
return;
}
var _a14=document.createElement("i");
var _a15=_a10.parentNode;
if(!_a15){
return;
}
_a15.replaceChild(_a14,_a10);
_a14.style.width=_a11+"px";
_a14.style.height=_a12+"px";
if(!XN.browser.IE){
_a14.style.display="inline-block";
_a14.appendChild(_a13);
_a14.style.overflow="hidden";
if(_a13.width>_a11){
_a13.style.marginLeft="-"+parseInt((_a13.width-_a11)/2)+"px";
}
if(_a13.height>_a12){
_a13.style.marginTop="-"+parseInt((_a13.height-_a12)/2)+"px";
}
}else{
_a14.style.zoom="1";
var top=parseInt((_a13.height-_a12)/2);
_a14.style.background="url("+_a10.src+") no-repeat -"+parseInt((_a13.width-_a11)/2)+"px -"+(top>0?top:0)+"px";
if(_a14.parentNode.tagName=="A"){
_a14.style.cursor="pointer";
}
}
};
_a13.src=_a10.src;
}
function roundify(_a17,_a18){
if(!_a18){
_a18=50;
}
if(_a17.height<=_a18){
return;
}
var _a19=_a17.parentNode;
if(!_a19){
return;
}
_a17.style.visibility="hidden";
var _a1a=document.createElement("i");
_a1a.title=_a17.title;
_a1a.className=_a17.className;
if(!XN.browser.IE){
_a1a.style.display="inline-block";
}
_a1a.style.overflow="hidden";
_a1a.style.width=_a18+"px";
_a1a.style.height=(_a17.height>_a18?_a18:_a17.height)+"px";
var _a1b=new Image();
_a1a.appendChild(_a1b);
_a1b.onload=function(){
_a1b.width=_a18;
_a19.replaceChild(_a1a,_a17);
if(_a1b.height>_a18){
_a1b.style.marginTop="-"+parseInt((_a1b.height-_a18)/2)+"px";
}
};
_a1b.src=_a17.src;
return;
}
(function(){
var _a1c=/kaixin\.com|renren\.com|xiaonei\.com/g;
XN.widgets.rp_domain=function rp(el){
if(el.tagName&&el.tagName.toLowerCase()=="a"){
if(el._d_rpd){
return true;
}
el._d_rpd=true;
if(/http|@/.test(el.innerHTML)&&XN.browser.IE){
var _a1e=el.innerHTML;
}
el.href=el.href.replace(_a1c,XN.env.domain);
if(!isUndefined(_a1e)){
el.innerHTML=_a1e;
}
return true;
}
return false;
};
var divs=["feedHome","newsfeed-module-box","notifications","messages"];
XN.widgets.domain_in_one={reg:function(el){
XN.event.addEvent(el,"mouseover",function(e){
var rp=XN.widgets.rp_domain;
var el=XN.event.element(e||window.event);
if(rp(el)){
return;
}
if(rp(el.parentNode)){
return;
}
rp(el.parentNode);
});
}};
XN.dom.ready(function(){
XN.array.each(divs,function(i,v){
if($(v)){
XN.widgets.domain_in_one.reg(v);
}
});
});
})();
$.wpi=$.wpi||{};
$.wpi.appNotify={element:null,init:function(){
if(this.element==null){
this.element=document.createElement("div");
this.element.className="notify-app";
this.element.innerHTML=["<div class=\"topbg\"></div>","<div class=\"innerCon\">","<h3></h3>","<a class=\"close\"><img src=\"http://a.xnimg.cn/imgpro/chat/notify-close.gif\" /></a>","<div class=\"desc\"></div>","<div class=\"action\">","<a href=\"javascript:;\" class=\"cancel\">\u53d6\u6d88\u53d1\u9001</a>","</div>","</div>","<div class=\"bottombg\"></div>","<iframe frameBorder=\"0\"></iframe>"].join("");
document.body.appendChild(this.element);
this.hackIe6();
var that=this;
var _a27=this.element.getElementsByTagName("a");
_a27[0].onclick=function(){
that.hide();
};
_a27[_a27.length-1].onclick=function(){
new XN.net.xmlhttp({url:"http://app."+XN.env.domain+"/app/notify/cancel",method:"post",data:"notifyId="+that.data.notifyId});
new XN.net.xmlhttp({url:"http://app."+XN.env.domain+"/app/notify/statistic/",method:"get",data:"op=2&app_id="+that.data.appId});
that.hide();
};
}
var _a28=this.element.getElementsByTagName("h3")[0];
var _a29="";
for(var i=0;i<this.data.receivers.length;i++){
var _a2b=this.data.receivers[i];
_a29+="<a href=\"http://www."+XN.env.domain+"/profile.do?id="+_a2b.id+"\" target=\"_blank\">"+_a2b.name+"</a>";
if(i!=this.data.receivers.length-1){
_a29+="\u3001";
}
}
_a28.innerHTML="\u4f60\u5c06\u7ed9"+_a29+(this.data.receivers.length>1?"\u7b49\u597d\u53cb":"")+"\u53d1\u9001\u4e00\u6761\u901a\u77e5";
var _a2c=XN.DOM.getElementsByClassName("desc",this.element)[0];
_a2c.innerHTML=this.data.content;
},hackIe6:function(){
if(XN.browser.IE6){
var that=this;
window.attachEvent("onscroll",function(){
that.element.className=that.element.className;
});
}
},show:function(data){
if(typeof data=="string"){
this.data=XN.json.parse(data);
}
this.init();
$(this.element).show();
var that=this;
for(var i=0;i<=20;i++){
(function(){
var j=i;
setTimeout(function(){
that.element.style.bottom=(that.easing(35*j,-107,137,700))+"px";
},35*j);
})();
}
var that=this;
setTimeout(function(){
that.hide();
},5500);
new XN.net.xmlhttp({url:"http://app."+XN.env.domain+"/app/notify/statistic/",method:"get",data:"op=1&app_id="+this.data.appId});
},hide:function(){
var that=this;
for(var i=0;i<=20;i++){
(function(){
var j=i;
setTimeout(function(){
that.element.style.bottom=(that.easing(35*j,30,-137,700))+"px";
j==20?$(that.element).hide():"";
},35*j);
})();
}
},easing:function(t,b,c,d){
return c*t/d+b;
}};
(function(){
var _a39={getPageScroll:function(){
try{
var x,y;
if(window.pageYOffset){
y=window.pageYOffset;
x=window.pageXOffset;
}else{
if(document.documentElement&&document.documentElement.scrollTop){
y=document.documentElement.scrollTop;
x=document.documentElement.scrollLeft;
}else{
if(document.body){
y=document.body.scrollTop;
x=document.body.scrollLeft;
}
}
}
}
catch(e){
}
return {x:x,y:y};
},getWholeHeight:function(){
try{
if(document.documentElement){
return document.documentElement.scrollHeight;
}else{
if(document.body){
return document.body.scrollHeight;
}
}
}
catch(e){
}
},getClientHeight:function(){
if(document.documentElement){
return document.documentElement.clientHeight;
}
}};
var _a3c;
var func=function(){
var _a3e=_a39.getPageScroll().y+_a39.getClientHeight();
var _a3f=_a39.getWholeHeight();
if(!func.loading&&_a3e===_a3f&&_a3c!==_a3f){
XN.events.fireEvent("scrollbottom");
}
_a3c=_a3e;
};
XN.event.addEvent(window,"scroll",func);
})();
XN.app.statsMaster={init:function(){
var j={ID:XN.cookie.get("id"),R:encodeURIComponent(location.href)};
var json=XN.JSON.build(j);
this.listener=function(e){
var e=e||window.event,_X=XN.event.pointerX(e),Y=XN.event.pointerY(e),U,T,el=XN.event.element(e),_a48=$("dropmenuHolder");
xx=XN.element.realLeft(_a48);
if(!(el&&el.tagName)){
return;
}
T=el.tagName.toLowerCase();
if(T=="a"){
U=el.href;
}
var _t=el.getAttribute("stats");
if(_t){
T=_t;
}
j.X=_X-xx;
j.Y=Y;
if(U){
j.U=encodeURIComponent(U);
}
if(T){
j.T=T;
}
json=XN.JSON.build(j);
new Image().src="http://dj."+XN.env.domain+"/click?J="+json+"&t="+Math.random();
};
XN.event.addEvent(document,"mousedown",this.listener);
if(!window.statisFocusEventAdded){
XN.event.addEvent(window,"focus",function(){
new Image().src="http://dj."+XN.env.domain+"/focus?J="+json+"&t="+Math.random();
});
window.statisFocusEventAdded=true;
}
if(!window.statisBlurEventAdded){
XN.event.addEvent(window,"blur",function(){
new Image().src="http://dj."+XN.env.domain+"/unfocus?J="+json+"&t="+Math.random();
});
window.statisBlurEventAdded=true;
}
if(!window.statisBottomEventAdded){
XN.events.addEvent("scrollbottom",function(){
new Image().src="http://dj."+XN.env.domain+"/scrollbottom?J="+json+"&t="+Math.random();
});
window.statisBottomEventAdded=true;
}
},destroy:function(){
XN.event.delEvent(document,"mousedown",this.listener);
}};
XN.dom.ready(function(){
XN.app.statsMaster.init();
});
XN.dom.ready(function(){
var _a4a=false;
var _a4b=true;
XN.event.addEvent(document,"mousedown",function(){
_a4b=false;
});
XN.event.addEvent(window,"blur",function(){
_a4b=true;
});
showConfirmDialog=function(){
var d=XN.DO.alert({title:"\u8bf7\u9886\u53d6\u60a8\u7684"+XN.env.siteName+"\u901a\u884c\u8bc1",modal:true,message:"<iframe id=\"frameactive\" width=\"410\" height=\"100%\" frameborder=\"no\" scrolling=\"no\" frameborder=\"0\" marginheight=\"0\" marginwidth=\"0\" src=\"about:blank\" ></iframe>",width:454,params:{showCloseButton:true},callBack:function(){
_a4a=false;
showConfirmDialog.fireEvent("close");
}});
arguments.callee.dialog=d;
d.footer.hide();
$("frameactive").src="http://channel."+XN.env.domain+"/confirm/show";
};
XN.event.enableCustomEvent(showConfirmDialog);
if(!XN.cookie.get("noconfirm")){
return;
}
var _a4d=setInterval(function(){
if(_a4b||window.noConfirmWindow||_a4a||!XN.cookie.get("noconfirm")){
return;
}
_a4a=true;
XN.cookie.del("noconfirm","/",XN.env.domain);
XN.cookie.del("noconfirm","/",window.location.hostname);
showConfirmDialog();
},1000);
XN.log("\u672a\u6fc0\u6d3b\u7528\u6237\u5f15\u5bfc\u521d\u59cb\u5316over");
});
var GuidBar={bar:null,list:[],addBar:function(){
if(window!=top||this.bar!=null){
return;
}
new XN.net.xmlhttp({url:"http://browse."+XN.env.domain+"/peoplebar.do?ran="+Math.random(),method:"get",onSuccess:function(r){
var _a4f=XN.json.parse(r.responseText);
if(_a4f.list.length>0){
GuidBar.buildStruts(_a4f);
}
}});
},buildStruts:function(obj){
this.list=obj.list;
var _a51=["<div class=\"doing clearfix\">","<div class=\"userinfo clearfix\">","<a href=\"http://www."+XN.env.domain+"/profile.do?id="+obj.user.id+"\" class=\"avatar\">","<img src=\""+obj.user.head+"\" />","</a>","<h3>"+obj.user.name+"\uff0c\u4f60\u597d\uff01</h3>","<p>\u5f00\u59cb\u627e\u4f60\u7684\u597d\u53cb\u5427:</p>","</div>","<div class=\"users\">","<div class=\"arrow\"></div>","<ul></ul>","<div class=\"more\"><a href=\"http://friend."+XN.env.domain+"/myfriendlistx.do?_ua_flag=42&ref=guide_bar_more#item_1\">\u66f4\u591a &raquo;</a></div>","</div>","</div>"].join("");
var _a52=this.bar=document.createElement("div");
_a52.className="guide-top";
_a52.innerHTML=_a51;
var _a53=_a52.getElementsByTagName("ul")[0];
for(var i=0,_a55=Math.min(this.list.length,5);i<_a55;i++){
_a53.appendChild(this.getFriend());
}
var _a56=$("navBar")||document.body.firstChild;
_a56.parentNode.insertBefore(_a52,_a56);
},getFriend:function(){
var list=this.list;
if(!list[0]){
return null;
}
var _a58=document.createElement("li");
_a58.className="clearfix";
_a58.innerHTML=["<a href=\"#nogo\" class=\"shut\" title=\"\u5173\u95ed\"></a>","<span class=\"headpichold\">","<a href=\"http://www."+XN.env.domain+"/profile.do?ref=peoplebar&id="+list[0].id+"\" title=\"\u67e5\u770b"+list[0].name+"\u7684\u4e2a\u4eba\u4e3b\u9875\" target=\"_blank\">","<img src=\""+list[0].head+"\" onload=\"roundify(this)\"/>","</a>","</span>","<span>","<a href=\"http://www."+XN.env.domain+"/profile.do?ref=peoplebar&id="+list[0].id+"\" class=\"name\" target=\"_blank\">"+list[0].name+"</a>","<p><a href=\"#nogo\" onclick=\"showRequestFriendDialog('"+list[0].id+"','"+list[0].name+"','"+list[0].head+"','','sg_peoplebar');return false;\" class=\"addfriend_action\"> \u52a0\u4e3a\u597d\u53cb</a></p>","</span>"].join("");
_a58.firstChild.onclick=this.replaceFriend;
list.splice(0,1);
return _a58;
},replaceFriend:function(e){
e=e||window.event;
var obj=e.target||e.srcElement;
var node=obj.parentNode;
var _a5c=GuidBar.getFriend();
if(_a5c){
node.parentNode.replaceChild(_a5c,node);
}else{
$(node).remove();
}
return false;
}};
(function(ns){
ns.imgsChecker=function(_a5e,_a5f){
this.imgArry=_a5e;
this.filter=_a5f;
if(isUndefined(this.filter.logoWidth)){
this.filter.logoWidth=88;
}
if(isUndefined(this.filter.logoHeight)){
this.filter.logoHeight=31;
}
if(!this.filter.abortSec){
this.filter.abortSec=3;
}
if(!this.filter.maxCheckCount){
this.filter.maxCheckCount=30;
}
this.init();
};
ns.imgsChecker.prototype={init:function(){
var This=this;
this.result=[];
this.count=0;
this.stopFlag=false;
var _a61=Math.min(This.filter.maxCheckCount,This.imgArry.length);
for(var i=0,j=_a61;i<j;i++){
(function(_a64){
var img=new Image();
img.src=This.imgArry[_a64]+"?t="+Math.random();
img.loadedTag=false;
var _a66=setTimeout(function(){
if(This.count==This.filter.limitImgs||_a64==_a61-1){
if(!This.stopFlag){
This.fireEvent("checkOver");
}
This.stopFlag=true;
return This.result;
}
},This.filter.abortSec*1000);
img.onload=function(){
img.loadedTag=true;
clearTimeout(_a66);
if(This.stopFlag){
return;
}
if(This.doFilter(this)){
This.fireEvent("checkOne",this);
This.result.push(this);
}
if(This.count==This.filter.limitImgs||_a64==_a61-1){
This.fireEvent("checkOver");
This.stopFlag=true;
return This.result;
}
};
img.onerror=function(){
This.imgArry.splice(_a64,1);
if(This.count==This.filter.limitImgs||_a64==This.imgArry.length){
if(!This.stopFlag){
This.fireEvent("checkOver");
}
This.stopFlag=true;
return This.result;
}
};
})(i);
}
},doFilter:function(img){
if(img.width==this.logoWidth||img.height==this.logoHeight){
this.count++;
return true;
}
if(img.width<this.filter.minWidth||img.height<this.filter.minHeight){
return false;
}
var _a68=img.width/img.height;
var _a69=img.height/img.width;
if(_a68>this.filter.maxRatioWH||_a69>this.filter.maxRatioHW){
return false;
}
this.count++;
return true;
}};
XN.event.enableCustomEvent(ns.imgsChecker.prototype);
})(XN.widgets);
XN.Bubble=function(conf){
$extend(this,conf);
this.init();
};
XN.Bubble.prototype={bs:[],init:function(){
this.getUIRef();
this.bindEvent();
},getUIRef:function(){
this.timer=null;
this.elem=$(this.IDContainer);
this.nList=$(this.elem).getElementsByTagName("section")[0];
},bindEvent:function(){
var This=this;
this.elem.addEvent("click",function(e){
e=e||window.event;
var obj=e.srcElement||e.target;
if(obj.tagName.toLowerCase()=="a"&&obj.className.indexOf("x-to-hide")>=0){
$(obj.parentNode.parentNode).remove();
if(!XN.string.trim(This.nList.innerHTML)){
This.hide();
}
}
});
this.elem.addEvent("mouseover",function(e){
This.delTimer();
});
this.elem.addEvent("mouseout",function(e){
This.startTimer();
});
this.addEvent("view_after_hide",function(){
This.clearBs();
});
this.addEvent("bubble_bs_unshifted",function(){
This.showNtfs();
This.show();
This.startTimer();
});
},unshiftBs:function(n){
this.bs.unshift(n);
this.fireEvent("bubble_bs_unshifted",n);
},clearBs:function(){
this.bs.length=0;
},showNtfs:function(){
this.nList.innerHTML=this.makeNtfs();
},show:function(){
this.elem.show();
},hide:function(){
this.elem.hide();
this.fireEvent("view_after_hide");
},makeNtfs:function(){
var html=[];
XN.array.each(this.bs,function(i,_a73){
html.push(_a73.content);
});
return html.join("");
},startTimer:function(fn){
var This=this;
this.delTimer();
this.timer=setTimeout(function(){
This.hide();
},6000);
},delTimer:function(){
if(this.timer){
clearTimeout(this.timer);
}
},setNotify:function(n){
this.unshiftBs(n);
}};
XN.event.enableCustomEvent(XN.Bubble.prototype);
XN.dom.ready(function(){
var b=$("system-notification-box");
if(!b){
return;
}
window.xn_bubble=new XN.Bubble({IDContainer:"system-notification-box"});
});
XN.pagerChannelIsOk=function(_a78){
try{
if(!XN.disableWebpager){
var _a79=XN.getFileVersionNum("http://s.xnimg.cn/jspro/xn.app.webpager.js");
if(_a79){
_a79=_a79.version;
}else{
_a79="a0";
}
var _a7a=_a78.wpVersion;
var _a7b=parseInt(_a79.substring(1));
var _a7c=parseInt(_a7a.substring(1));
if(_a7a&&_a7c>_a7b){
XN.loadFile("http://s.xnimg.cn/"+_a78.wpVersion+"/jspro/xn.app.webpager.js");
}else{
XN.loadFile("http://s.xnimg.cn/jspro/xn.app.webpager.js");
}
}
}
catch(e){
}
};
if(/\((iPhone|iPad|iPod)/i.test(navigator.userAgent)){
XN.disableWebpager=true;
}
XN.dom.ready(function(){
if(!$("navSearchInput")){
return;
}
var fix=null;
function showTip(){
if(XN.form.help("navSearchInput").getRealValue()!==""){
return;
}
if(!fix){
fix=new XN.ui.fixPositionElement({alignWith:"navSearchInput",tagName:"div"});
fix.hide();
fix.setContent("&nbsp;\u591a\u4e2a\u5173\u952e\u5b57\u7528\u7a7a\u683c\u9694\u5f00&nbsp;<br />&nbsp;\uff08\u4f8b\uff1a\u6c6a\u6d0b \u5317\u4eac\u5927\u5b66\uff09&nbsp;");
fix.container.style.cssText="width:"+($("navSearchInput").offsetWidth-2)+"px;padding:3px 0;background:#EEE;border:1px solid #BDC7D8;opacity:0.8;text-align:center;";
}
fix.show();
}
XN.event.addEvent("navSearchInput","focus",showTip);
XN.event.addEvent("navSearchInput","blur",function(){
if(fix){
setTimeout(function(){
fix.hide();
},100);
}
});
XN.event.addEvent("navSearchInput","keydown",function(){
if(fix){
fix.hide();
}
});
});
XN.dom.ready(function(){
if(!$("navSearchInput")){
return;
}
new XN.ui.navSearchBar({input:"navSearchInput",submit:$("navSearchSubmit"),form:$("globalSearchForm"),params:{page:true},tip:"\u627e\u4eba\u3001\u516c\u5171\u4e3b\u9875\u3001\u6e38\u620f"});
return;
if(!$("searchMenuAction")){
return;
}
new XN.ui.menu({bar:"searchMenuAction",menu:"searchdropdownMenu",fireOn:"mouseover",offsetX:1});
});
XN.dom.ready(function(){
window.AppsDropMenu.dropInit();
});
XN.dom.ready(function(){
if(!$("profileDropMenu")){
return;
}
var menu=new XN.ui.menu({bar:"profileDropMenu",menu:"profileMenu",offsetX:$("showProfileMenu").realLeft()-$("profileDropMenu").realLeft(),offsetY:($("showProfileMenu").realTop()+$(Sizzle("#navBar .nav-body")[0]).offsetHeight)-($("profileDropMenu").realTop()+35),fireOn:"mouseover"});
menu.onShow=function(){
$("showProfileMenu").addClass("hover");
$("profileDropMenu").addClass("drop-menu-btn-hover");
};
menu.onHide=function(){
$("showProfileMenu").delClass("hover");
$("profileDropMenu").delClass("drop-menu-btn-hover");
};
});
XN.dom.ready(function(){
if(!$("friendDropMenu")){
return;
}
var menu=new XN.ui.menu({bar:"friendDropMenu",menu:"friendMenu",offsetX:$("showFriendMenu").realLeft()-$("friendDropMenu").realLeft(),offsetY:($("showFriendMenu").realTop()+$(Sizzle("#navBar .nav-body")[0]).offsetHeight)-($("friendDropMenu").realTop()+35),fireOn:"mouseover"});
menu.onShow=function(){
$("showFriendMenu").addClass("hover");
$("friendDropMenu").addClass("drop-menu-btn-hover");
};
menu.onHide=function(){
$("showFriendMenu").delClass("hover");
$("friendDropMenu").delClass("drop-menu-btn-hover");
};
});
XN.dom.ready(function(){
if(!$("showNewNav")){
return;
}
var btns=Sizzle(".drop-menu-btn",$("navBar"));
if(btns.length==0){
return;
}
for(var i=0;i<btns.length;i++){
$(btns[i]).addEvent("click",function(e){
e.preventDefault();
});
}
});
XN.dom.ready(function(){
if(!$("optionMenuActive")){
return;
}
new XN.UI.menu({bar:"optionMenuActive",menu:"optiondropdownMenu",fireOn:"mouseover"});
});
XN.dom.ready(function(){
if(!$("accountMenu")){
return;
}
var _a83=null;
var _a84=20;
$("accountMenu").addEvent("mouseover",function(){
if($("otherAccount").innerHTML!=""){
return;
}
new XN.NET.xmlhttp({url:"http://www.renren.com/getOtherAccounts",method:"get",onSuccess:function(_a85){
var r=XN.JSON.parse(_a85.responseText),_a87=r.otherAccounts,_a88=(_a87!=null&&_a87.length!=0),_a89=(_a87!=null?_a87.length:0),_a8a=getSiteName(r);
var _a8b=_a89==1;
$("otherAccount").innerHTML=["<div class=\"account-detail clearfix\">","<a href=\"javascript:;\" class=\"figure\" style=\"cursor:default\">","<img src=\"",r.self_head,"\" />","</a>","<div class=\"detail\">","<p class=\"name\" title=\"",r.self_name,"\">",r.self_name,"</p>","<p class=\"grade\">",r.self_level,"\u7ea7</p>","<p class=\"friends\">",_a8a,"</p>","</div>","</div>","<div class=\"action\"",_a88?"":" style=\"display:none;\"",">","<a href=\"javascript:;\" class=\"switch\" ",(_a8b?" style=\"padding: 0px 12px\"":""),">",(_a8b?"\u5207\u6362\u81f3"+getSiteName(_a87[0]):"\u5207\u6362\u8eab\u4efd"),"</a>","</div>"].join("");
$("otherAccount").style.display="block";
$(Sizzle("#accountDropDownMenu a.switch")[0]).addEvent("click",function(){
if(_a89>1){
_a83=XN.DO.alert({title:"\u5207\u6362\u8eab\u4efd",msg:["<div id=\"switchAccountPopup\" class=\"switch-account-popup clearfix\">","<div id=\"multiSwitchTip\" class=\"switch-tip\">","\u4f60\u53ef\u4ee5\u901a\u8fc7\u201c\u5207\u6362\u8eab\u4efd\u201d\uff0c\u4ee5\u516c\u5171\u4e3b\u9875\u7684\u8eab\u4efd\u52a0\u597d\u53cb\u3001\u56de\u8e29\u7c89\u4e1d\u3001\u4e0e\u5176\u4ed6\u4e3b\u9875\u4e92\u52a8\u3002","</div>","<div class=\"accounts-list-wrapper\">","<div id=\"anotherAccount\">",generateAccountsListHtml(0,_a89>_a84?_a84:_a89),"</div>","</div>","<div id=\"pagerWrapper\" class=\"accounts-pager\"><ol id=\"accountsPager\" class=\"pagerpro\"></ol></div>","</div>"].join(""),noPadding:true,button:"\u53d6\u6d88",Y:60,showCloseButton:true});
_a83.container.className="other-accounts-alert";
window.scrollTo(0,0);
if(_a89>_a84){
XN.loadFile("http://s.xnimg.cn/jspro/xn.ui.pager.js",function(){
var _a8c=new XN.ui.pager({showCount:5,container:$("accountsPager")});
_a8c.setPageCount(parseInt((_a89-1)/_a84+1));
_a8c.setCurrentPage(1);
_a8c.addEvent("pageChange",function(num){
$("anotherAccount").innerHTML=generateAccountsListHtml((num-1)*_a84,num*_a84);
window.scrollTo(0,0);
$("anotherAccount").scrollTop=0;
});
});
}else{
if(_a89<=4){
$("anotherAccount").style.height="auto";
$("anotherAccount").style.overflow="hidden";
}else{
$("pagerWrapper").hide();
}
}
}else{
if(_a89==1){
handleSwitchButtonClick(_a87[0].head,_a87[0].name,_a87[0].id,getSiteName(_a87[0]),true);
}
}
});
function generateAccountsListHtml(_a8e,end){
var _a90=[];
for(var i=_a8e;i<end;i++){
var _a92=_a87[i];
if(_a92==undefined){
break;
}
_a90=_a90.concat(["<div class=\"account-detail clearfix accounts-list\" style=\"",(i==_a8e?"":"border-top:1px solid #CCCCCC;"),"\">","<a href=\"","http://www.renren.com/profile.do?id=",_a92.transId,"\" class=\"figure\">","<img src=\"",_a92.head,"\" />","</a>","<div class=\"detail\" style=\"float:left;width:auto;height:50px;line-height:50px;\">","<p class=\"name\" title=\"",_a92.name,"\">",cutShort(_a92.name),"</p>","<p class=\"grade\"></p>","</div>","<div class=\"operate\">","<input class=\"input-submit\" type=\"button\" value=\"\u5207\u6362\" ","onclick=\"handleSwitchButtonClick('",_a92.head,"','",cutShort(_a92.name),"','",_a92.id,"','",getSiteName(_a92),"')\"/>","</div>","</div>"]);
}
return _a90.join("");
}
}});
});
function cutShort(name){
if(!name){
return name;
}
return name.length>10?name.substring(0,10)+"...":name;
}
function getSiteName(_a94){
var _a95="\u5e10\u53f7";
if(_a94.self_isPage=="true"||_a94.isPage=="true"){
_a95="\u516c\u5171\u4e3b\u9875";
}else{
if(_a94.self_domain){
if(_a94.self_domain=="kaixin.com"){
_a95="\u5f00\u5fc3\u5e10\u53f7";
}else{
if(_a94.self_domain=="renren.com"){
_a95="\u4eba\u4eba\u5e10\u53f7";
}
}
}else{
if(_a94.domain){
if(_a94.domain=="kaixin.com"){
_a95="\u5f00\u5fc3\u5e10\u53f7";
}else{
if(_a94.domain=="renren.com"){
_a95="\u4eba\u4eba\u5e10\u53f7";
}
}
}
}
}
return _a95;
}
window.handleSwitchButtonClick=function(head,name,_a98,_a99,_a9a){
new XN.NET.xmlhttp({url:"http://www.renren.com/switchAccount",data:"origUrl="+encodeURIComponent(window.location.href)+"&destId="+_a98,onSuccess:function(_a9b){
if(_a83){
_a83.hide();
}
var r=XN.JSON.parse(_a9b.responseText);
if(r.isJump){
window.location=r.url;
}else{
showUserInfoInputArea(head,name,_a98,_a99,r,_a9a);
}
}});
};
function showUserInfoInputArea(head,name,_a9f,_aa0,res,_aa2){
var _aa3=XN.DO.confirm({title:"\u5207\u6362\u8eab\u4efd",msg:["<div id=\"switchAccountPopup\" class=\"switch-account-popup clearfix\">","<div id=\"switchAccountError\" class=\"error-msg\" style=\"display:none\"></div>","<div class=\"account-info\">","<div class=\"account-detail clearfix\">","<a href=\"javascript:;\" class=\"figure\" style=\"cursor:default\">","<img src=\"",head,"\" />","</a>","<div class=\"detail\">","<p class=\"name\" style=\"width:60px;margin-top:16px;\" title=\"",name,"\">",name,"</p>","<p class=\"grade\"></p>","</div>","</div>","</div>","<div class=\"account-login\">","<p style=\"color:#5B5B5B;padding-left:17px;\">\u8bf7\u8f93\u5165",getSiteName(res),"\"",res.name,"\"\u5bf9\u5e94\u7684\u5bc6\u7801</p>","<div class=\"account\">","<span class=\"label\">\u5e10\u53f7:</span><span>",res.account,"</span>","</div>","<div class=\"password\">","<span class=\"label\">\u5bc6\u7801:</span><input type=\"password\" id=\"switchAccountPassword\" class=\"input-text\" />","</div>","<div id=\"verifycode\" class=\"verifycode\"",res.showIC?"":" style=\"display:none\"","><span class=\"label\">\u9a8c\u8bc1\u7801:</span><input id=\"switchVerifyCode\" type=\"text\" class=\"input-text\" name=\"ick\" /></div>","<div id=\"verifycode-image\" class=\"verifycode-image\"",res.showIC?"":" style=\"display:none\"","><img id=\"loginVerifyPic\" src=\"http://icode.renren.com/getcode.do?rk=300&t=LOGIN&rnd=",Math.random(),"\" /> <a href=\"javascript:;\" onclick=\"changeIC();return false;\">\u6362\u4e00\u4e2a</a></div>","</div>","</div>"].join(""),no:_aa2?"\u53d6\u6d88":"\u8fd4\u56de",showCloseButton:true,callback:function(r){
if(!r){
if(_a83){
_a83.show();
}
return;
}
this.preventHide();
new XN.NET.xmlhttp({url:"http://www.renren.com/verifypwd/checkPwd",data:"ick="+$("switchVerifyCode").value+"&pwd="+$("switchAccountPassword").value+"&origUrl="+encodeURIComponent(window.location.href)+"&destId="+_a9f+"&showIC="+($("verifycode-image").style.display!="none"),onSuccess:function(_aa5){
var r=XN.JSON.parse(_aa5.responseText);
if(r.status=="fail"){
$("switchAccountError").innerHTML=r.msg;
$("switchAccountError").style.display="block";
Sizzle(".account-login .verifycode")[0].style.display="block";
Sizzle(".account-login .verifycode-image")[0].style.display="block";
changeIC();
}else{
if(r.status=="ok"){
window.location=r.msg;
}
}
}});
}});
_aa3.container.className="account-login-alert";
}
window.changeIC=function(){
$("loginVerifyPic").src="http://icode.renren.com/getcode.do?rk=300&t=LOGIN&rnd="+Math.random();
};
new XN.ui.menu({bar:"accountMenu",menu:"accountDropDownMenu",fireOn:"mouseover",alignType:"3-2"}).onShow=function(){
if($("accountMenuTip")){
$("accountMenuTip").hide();
new XN.NET.xmlhttp({url:"http://www."+XN.env.domain+"/closeShowNewHeaderTip"});
}
};
});
XN.dom.ready(function(){
if(!$("accountMenu")||!$("isShowNewHeaderTip")){
return;
}
var tip=$element("div");
tip.id="accountMenuTip";
tip.innerHTML=["<div class=\"clearfix\" style=\"border:1px solid #FF9900;background:#FFFCC3;color:#5B5B5B;width:170px;height:30px;padding:8px 3px 8px 8px;overflow:hidden;\">","<a href=\"javascript:;\" class=\"x-to-hide\" style=\"float:right;\"></a>","<div style=\"_line-height:normal!important;\"><span style=\"color:#f00;\">\u65b0\u529f\u80fd\uff1a</span>\u70b9\u51fb\u201c\u5207\u6362\u5e10\u53f7\u201d\uff0c\u5728\u4eba\u4eba\u4e0e\u5f00\u5fc3\u5e10\u53f7\u95f4\u5207\u6362</div>","</div>","<div style=\"background:url(http://a.xnimg.cn/imgpro/arrow/tip-arrow-up.png) 0 0 no-repeat;width:11px;height:6px;margin-top:-53px;margin-left:155px;_position:relative;\"></div>"].join("");
$(Sizzle("a.x-to-hide",tip)[0]).addEvent("click",function(){
tip.hide();
new XN.NET.xmlhttp({url:"http://www."+XN.env.domain+"/closeShowNewHeaderTip"});
});
new XN.ui.fixPositionElement({id:tip,alignWith:"accountMenu",alignType:"3-2",offsetY:3});
});
XN.dom.ready(function(){
if(!$("moreWeb")){
return;
}
new XN.UI.menu({bar:"moreWeb",menu:"moredownWeb",fireOn:"click",alignType:"3-2",offsetX:1});
});
object.add("xn.mention",function(_aa8){
var _aa9=this.Mention=function(){
this.author="chuanye.wang@foxmail.com";
this.reg=/@[^@\s\)]{0,20}$/;
this.input=null;
this.ugcId="";
this.ugcType="";
this.ownerId="";
this.popTop=false;
this.scrollable=false;
this.titles={0:"\u60f3\u7528@\u63d0\u5230\u8c01\uff1f(\u6700\u591a10\u6b21)",1:"\u7531\u4e8e\u9690\u79c1\u8fd9\u91cc\u53ea\u80fd@\u5171\u540c\u597d\u53cb(\u6700\u591a10\u6b21)",2:"\u7531\u4e8e\u9690\u79c1\u8fd9\u91cc\u4e0d\u80fd\u4f7f\u7528@",3:"\u676f\u5177\u4e86\uff0c\u7f51\u7edc\u9519\u8bef\u6682\u65f6\u4e0d\u80fd@\u4e86:(",4:"\u9009\u62e9\u6700\u8fd1@\u8fc7\u7684\u670b\u53cb\uff0c\u6216\u7ee7\u7eed\u8f93\u5165\u59d3\u540d(\u6700\u591a10\u6b21)"};
extendObject(this,arguments[0]);
XN.event.enableCustomEvent(this);
};
_aa9.init=function(list){
for(var i=0;i<list.length;i++){
(function(){
var obj=list[i].obj,_aad=list[i].ugcId||"",_aae=list[i].ugcType||"",_aaf=list[i].ownerId||"",_ab0=list[i].scrollable||false,_ab1=list[i].popTop||false,_ab2=list[i].whisper||true,_ab3=list[i].button||null;
if(obj.mention||(obj.tagName.toLowerCase()!="input"&&obj.tagName.toLowerCase()!="textarea")){
return;
}
if(XN.browser.IE){
obj.style.fontFamily=document.body.currentStyle.fontFamily;
obj.style.fontSize=document.body.currentStyle.fontSize;
}
obj=$(obj);
if(!obj.mention){
obj.mention=new _aa9({input:obj,ugcId:_aad,ugcType:_aae,ownerId:_aaf,scrollable:_ab0,popTop:_ab1,whisper:_ab2,button:_ab3});
}
obj.addEvent("keyup",function(_ab4){
obj.mention.check();
obj.mention.doNotCheck=false;
});
obj.addEvent("mouseup",function(_ab5){
obj.mention.check();
});
obj.addEvent("focus",function(){
obj.mention.check();
});
obj.addEvent("keydown",function(_ab6){
if(_ab6.keyCode==13&&obj.mention.noMatch){
obj.mention.selector.menu.hide();
}
if((_ab6.keyCode==13||_ab6.keyCode==38||_ab6.keyCode==40)&&obj.mention.selectorShow&&!obj.mention.noMatch){
obj.mention.doNotCheck=true;
XN.event.stop(_ab6);
obj.mention.selector._inputOnkeydown(_ab6);
}
});
if(obj.mention.button){
XN.event.addEvent(obj.mention.button,"click",function(){
obj.focus();
setTimeout(function(){
var v=obj.value,nv=v+"@";
obj.value=nv;
obj.focus();
obj.mention.check();
},100);
});
}
})();
}
};
_aa9.prototype={key:"",keyIndex:"",front:"",last:"",flag:null,atPos:{},curPos:null,masker:null,selector:null,selectorShow:false,doNotCheck:false,noMatch:false,fsInput:null,privacy:"haveNotCheck",tip:null,log:function(lg){
if(console&&console.log){
console.log(lg);
}
},check:function(){
if(this.doNotCheck){
return;
}
this.initSelector();
if(!this.selector){
return;
}
if(this.isChecking){
return;
}
this.isChecking=true;
var _aba=$("whisper");
if(_aba&&this.whisper){
if(_aba.checked){
this.privacy=2;
}else{
this.privacy=this.oldPrivacy;
}
this.renewTip();
if(!/@.+\(\d+\)\s/.test(this.input.value)){
$(_aba).disabled=false;
$(_aba.parentNode).title="";
}else{
if(!_aba.checked){
$(_aba).disabled=true;
$(_aba.parentNode).title="\u4eb2\uff01\uff01\uff01\u4f60\u7528@\u4e86\uff01\uff01\uff01\u6709\u6728\u6709\uff01\uff01\uff01@\u522b\u4eba\u5c31\u4e0d\u80fd\u7528\u6084\u6084\u8bdd\u4e86\u554a\u4eb2\uff01\uff01\uff01";
}
}
}
this.curPos=this.getCurPos();
var key=this.input.value.substring(0,this.curPos).match(this.reg);
if(key){
this.key=key[0].slice(1);
this.keyIndex=key.index;
this.front=this.input.value.substring(0,this.keyIndex);
this.setContent();
this.atPos={X:this.flag.realLeft()-this.masker.scrollLeft+2,Y:this.flag.realTop()-this.masker.scrollTop+this.flag.offsetHeight+4};
var fire={key:this.key,pos:this.atPos};
if(this.privacy!=0&&this.privacy!=1){
this.selector.menu.show();
}else{
this.fsInput.value=this.key;
this.selector._startCheck();
this.selector.menu.show();
}
this.renewTip();
if(key[0]=="@"){
if(XN.user.recentAt&&this.privacy==0){
this.selector._buildMenu(XN.user.recentAt);
XN.element.delClass(this.selector._currentLi,this.selector.getConfig("liHoverClass"));
this.selector._currentLi=null;
this.renewTip(4);
}
}
this.locateMenu();
this.selectorShow=true;
this.fireEvent("atInputed",fire);
}else{
this.fsInput.value="";
this.selector.menu.hide();
this.selectorShow=false;
this.fireEvent("noAtNow");
}
this.isChecking=false;
},getCss:function(){
var el=this.input;
if(window.getComputedStyle){
var _abe=window.getComputedStyle(el,null);
}else{
var _abe=el.currentStyle;
}
return _abe;
},getCurPos:function(){
var ele=this.input;
var cPos=0;
if(XN.browser.IE&&ele.tagName.toLowerCase()=="input"){
var _ac1=document.selection.createRange();
var _ac2=ele.createTextRange();
_ac2.collapse(true);
_ac2.select();
var _ac3=document.selection.createRange();
_ac3.setEndPoint("EndToEnd",_ac1);
cPos=_ac3.text.length;
_ac1.select();
}else{
try{
cPos=XN.form.help(ele).cursorPosition().start;
}
catch(e){
cPos=0;
}
}
return cPos;
},mask:function(){
if(this.masker){
this.locateMasker();
return;
}
this.appendMasker();
this.locateMasker();
},appendMasker:function(){
this.masker=$element("div");
var s=this.getCss();
var _ac5=this.input.tagName.toLowerCase()=="input";
var fix;
if(XN.browser.IE){
fix=4;
}else{
fix=2;
}
if(this.scrollable){
this.masker.style.cssText="width:"+s.width+";"+"box-sizing:"+s.boxSizing+";"+"padding-left:"+s.paddingLeft+";"+"padding-right:"+s.paddingRight+";"+"height:"+this.input.clientHeight+"px;"+"line-height:"+s.lineHeight+";"+"border-left-style:"+s.borderLeftStyle+";"+"border-right-style:"+s.borderRightStyle+";"+"border-top-style:"+s.borderTopStyle+";"+"border-bottom-style:"+s.borderBottomStyle+";"+"border-left-width:"+s.borderLeftWidth+";"+"border-right-width:"+s.borderRightWidth+";"+"border-top-width:"+s.borderTopWidth+";"+"border-bottom-width:"+s.borderBottomWidth+";"+"border-left-color:"+s.borderLeftColor+";"+"border-right-color:"+s.borderRightColor+";"+"border-top-color:"+s.borderTopColor+";"+"border-bottom-color:"+s.borderBottomColor+";"+"overflow-y:hidden;"+"overflow-x:hidden;"+"font-size:"+s.fontSize+";"+"font-weight:"+s.fontWeight+";"+"font-family:"+s.fontFamily+";"+"font-style:"+s.fontStyle+";"+"word-wrap:"+(_ac5?"normal":"break-word")+";"+"z-index:-1000;position:absolute;visibility:hidden";
}else{
this.masker.style.cssText="width:"+(this.input.clientWidth-fix)+"px;"+"padding-left:"+s.paddingLeft+";"+"padding-right:"+(XN.browser.IE?"0px":s.paddingRight)+";"+"height:"+this.input.clientHeight+"px;"+"line-height:"+s.lineHeight+";"+"border-left-style:"+s.borderLeftStyle+";"+"border-right-style:"+s.borderRightStyle+";"+"border-top-style:"+s.borderTopStyle+";"+"border-bottom-style:"+s.borderBottomStyle+";"+"border-left-width:"+s.borderLeftWidth+";"+"border-right-width:"+s.borderRightWidth+";"+"border-top-width:"+s.borderTopWidth+";"+"border-bottom-width:"+s.borderBottomWidth+";"+"border-left-color:"+s.borderLeftColor+";"+"border-right-color:"+s.borderRightColor+";"+"border-top-color:"+s.borderTopColor+";"+"border-bottom-color:"+s.borderBottomColor+";"+"overflow-y:hidden;"+"overflow-x:hidden;"+"font-size:"+s.fontSize+";"+"font-weight:"+s.fontWeight+";"+"font-family:"+s.fontFamily+";"+"font-style:"+s.fontStyle+";"+"word-wrap:"+(_ac5?"normal":"break-word")+";"+"z-index:-1000;position:absolute;visibility:hidden";
}
if(_ac5){
this.masker.style.whiteSpace="nowrap";
}
document.body.appendChild(this.masker);
},locateMasker:function(){
this.masker.style.left=$(this.input).realLeft()+"px";
this.masker.style.top=$(this.input).realTop()+4+"px";
},setContent:function(){
this.mask();
var _ac7=$element("span"),_ac8=$element("span"),_ac9=$element("span");
this.flag=_ac8;
_ac7.innerHTML=this.parse(this.front);
_ac8.innerHTML="@";
_ac9.innerHTML=this.key;
this.masker.innerHTML="";
if(this.input.tagName.toLowerCase()=="input"){
_ac7.style.cssText="white-space:nowrap;";
_ac8.style.cssText="white-space:nowrap;";
_ac9.style.cssText="white-space:nowrap;";
}
this.masker.appendChild(_ac7);
this.masker.appendChild(_ac8);
this.masker.appendChild(_ac9);
if(this.input.scrollHeight>this.input.clientHeight){
this.masker.style.overflowY="scroll";
}
if(this.input.scrollHeight<=this.input.clientHeight){
this.masker.style.overflowY="hidden";
}
this.masker.scrollLeft=this.masker.scrollWidth;
this.masker.scrollTop=this.masker.scrollHeight;
},parse:function(v){
var sp=XN.browser.IE?("<pre style=\"font-family:"+this.getCss().fontFamily+";font-size:"+this.getCss().fontSize+";display: inline; word-wrap: break-word; overflow: hidden\"> </pre>"):("<span style=\"white-space: pre-wrap;font-family:"+this.getCss().fontFamily+";font-size:"+this.getCss().fontSize+";\"> </span>");
var h={" ":((this.input.tagName.toLowerCase()=="input")?"&nbsp;":sp),"\r":"","\n":"<br />"};
var reg=/\r|\n| /gi;
return v.replace(reg,function(k){
return h[k];
});
},getRecent:function(){
if(XN.user.recentAt){
return;
}
var that=this;
new XN.net.xmlhttp({url:"http://status.renren.com/GetMetion.do?userId="+XN.user.id+"&limit=6&flag=1&offset=0",method:"get",onSuccess:function(r){
if(XN.user.recentAt){
return;
}
if(r.responseText=="{}"){
return;
}
var r=XN.json.parse(r.responseText);
if(r.code!=0||r.result.length<1){
return;
}
XN.user.recentAt=r.result;
that.check();
}});
},newSelector:function(ps){
var that=this;
var _ad3=["<div class=\"mentionFrdList\">","<div class=\"m-autosug-minwidth\">","<div class=\"m-autosug-content\">","<div class=\"mention-tip\"><span>",that.titles[that.privacy],"</span></div>","<ul class=\"search-Result\" style=\"overflow:hidden;\"></ul>","</div>","</div>","</div>"].join("");
this.selector=new XN.ui.friendSelector({url:ps.url,id:ps.id,autoSelectFirst:true,limit:ps.limit,param:ps.param,noResult:function(){
that.noMatch=true;
return "\u6ca1\u6709\u5339\u914d\u7ed3\u679c";
},noInput:null,wrapper:_ad3});
var _ad4=this.selector;
if(this.popTop){
_ad4.menu=new XN.ui.menu({button:that.selector.input,menu:that.selector._menuList,fireOn:"manual",alignType:"1-4",offsetY:-17});
}
_ad4.buildMenu=function(r){
return "<img src=\""+(r.head||r.headUrl)+"\" width=\"30\" height=\"30\" alt=\""+r.name+"\"/>"+"<strong style=\"white-space:nowrap\">"+r.name+"</strong>";
};
_ad4._buildMenu=function(_ad6){
var This=_ad4;
This.result=_ad6;
if(_ad6.length>0){
This.fireEvent("hasResult");
}
if(_ad6.length==0){
This.fireEvent("noResult");
var _ad8=This.getConfig("noResult");
if(isFunction(_ad8)){
_ad8=_ad8.call(This);
}
This._ul.innerHTML="<li>"+_ad8+"</li>";
This.menu.show();
This.fireEvent("menuBuilt");
This._currentLi=null;
return;
}
var lis=[];
lis.push(This.firstMenuItem());
var len=_ad6.length-1;
XN.array.each(_ad6,function(i,v){
lis.push("<li onmouseover=\"getCompleteMenu("+This._MID+")._highlightMenuItem(this);\" aid=\""+i+"\">"+This.buildMenu(v)+"</li>");
});
lis.push(This.lastMenuItem());
This._ul.innerHTML=lis.join("");
if(This.getConfig("autoSelectFirst")){
This._highlightMenuItem(This._ul.firstChild);
}
This.menu.show();
This.fireEvent("menuBuilt");
};
_ad4._startCheck=function(){
var This=_ad4;
if(This._userInput){
This._userInput=false;
return;
}
This._checkInput();
};
_ad4._endCheck=function(){
_ad4._lastInput="";
_ad4._ul.innerHTML="";
return;
};
_ad4.loadFriends=function(r){
if(_ad4.isLoading()){
return;
}
_ad4._isLoading=true;
_ad4._onload();
};
_ad4._onload=function(){
_ad4.isLoading=false;
_ad4._ready=true;
_ad4.DS=new XN.util.DS_friends({url:_ad4.getConfig("url"),qkey:_ad4.getConfig("qkey"),limit:_ad4.getConfig("limit"),page:_ad4.getConfig("page"),param:_ad4.getConfig("param")});
_ad4.DS.query=function(v,_ae0){
var This=this;
try{
this._request.abort();
}
catch(e){
}
function parseDS_JSON(r){
r=r.responseText;
var pp;
try{
var rt=XN.JSON.parse(r);
if(This.rootKey&&rt[This.rootKey]){
pp=rt[This.rootKey];
}else{
pp=rt;
}
}
catch(e){
pp=[];
}
_ae0(pp);
}
var _ae5=XN.json.parse(this.param);
this._request=new XN.net.xmlhttp({url:this.url,data:"q="+encodeURIComponent(v)+"&l="+this.limit+(!!_ae5.friendId?("&friend="+_ae5.friendId):""),method:this.method,onSuccess:parseDS_JSON});
};
};
this.bindEvent();
this.getRecent();
},buildValue:function(p){
this.last=this.input.value.substring(this.curPos);
this.input.value=this.front+"@"+p.name+"("+(p.id||p.userId)+")"+" "+this.last;
this.refocus(p);
},refocus:function(p){
var that=this;
var name=p.name,id=p.id||p.userId;
var _aeb=this.front.length+1+name.length+id.toString().length+3;
var cst=this.input.scrollTop;
this.fsInput.value="";
setTimeout(function(){
XN.form.help(that.input).focus(_aeb);
that.input.scrollTop=cst;
that.selector._endCheck();
that.selector.menu.hide();
that.selectorShow=false;
that.fireEvent("refocus");
},0);
},bindEvent:function(){
var that=this;
this.selector.addEvent("select",function(p){
that.buildValue(p);
that.doNotCheck=false;
});
this.selector.addEvent("hasResult",function(){
that.noMatch=false;
});
this.selector.addEvent("noinput",function(){
that.noMatch=true;
that.selector._ul.innerHTML="";
that.selector.menu.show();
});
$(this.input).addEvent("blur",function(){
if(that.selector){
that.selector._endCheck();
that.selector.menu.hide();
}
});
if(this.popTop){
this.selector.addEvent("menuBuilt",function(){
that.locateMenu();
});
}
if($("whisper")&&this.whisper){
if(!this.oldPrivacy){
this.oldPrivacy=this.privacy;
}
$("whisper").addEvent("click",function(){
if($("whisper").checked){
that.privacy=2;
}else{
that.privacy=that.oldPrivacy;
}
that.renewTip();
});
}
},renewTip:function(t){
var tip=Sizzle(".mention-tip span",this.selector._ul.parentNode)[0];
tip.innerHTML=this.titles[t]||this.titles[this.privacy];
},crFsInput:function(){
if(!this.fsInput){
this.fsInput=$element("input");
this.fsInput.type="text";
this.fsInput.style.cssText="position:"+((this.scrollable&&!XN.browser.IE6)?"fixed":"absolute")+";z-index:-1000;border:0 none;padding:0;height:0;overflow:hidden;";
document.body.appendChild(this.fsInput);
}
},locateMenu:function(){
this.fsInput.style.left=this.atPos.X+"px";
this.fsInput.style.top=this.atPos.Y+"px";
this.selector.menu.refresh();
if(this.scrollable){
var el=this.selector._menuList;
var fix=XN.browser.IE6?0:$("dropmenuHolder").realLeft();
if(!XN.browser.IE6){
el.style.position="fixed";
}
el.style.left=parseInt(el.style.left)+fix+"px";
if(XN.browser.IE6){
if(!el["scEvent4At"]){
var that=this;
XN.event.addEvent(window,"scroll",function(){
setTimeout(function(){
that.check();
},500);
});
el["scEvent4At"]=true;
}
}
}
},initSelector:function(){
this.crFsInput();
if(this.selector){
return;
}
var that=this;
var cb=function(){
var fid=that.getFinalId(),surl="http://sg.renren.com/s/c",par={"friendId":fid};
if(fid==""){
if(that.privacy==0&&XN.mentionGroup){
surl="http://sg.renren.com/s/gf";
}else{
surl="http://sg.renren.com/s/f";
}
par={};
}
that.newSelector({url:surl,id:that.fsInput,limit:10,friendId:fid,param:par});
that.selector.loadFriends();
};
this.getPrivacy(cb);
},getFinalId:function(){
if(this.privacy==0){
return "";
}
if(this.privacy==1){
return this.ownerId;
}
if(this.privacy!=0&&this.privacy!=1){
return -1;
}
},getPrivacy:function(cb){
if(this.privacy!="haveNotCheck"){
return;
}
if((this.ugcType=="blog"||this.ugcType=="photo"||this.ugcType=="album"||this.ugcType=="gossip")){
this.doNotCheck=true;
var that=this;
var _afb={"blog":"http://blog.renren.com/blog/"+this.ownerId+"/"+this.ugcId+"/privacy","photo":"http://photo.renren.com/photo/"+this.ownerId+"/photo-"+this.ugcId+"/privacy","album":"http://photo.renren.com/photo/"+this.ownerId+"/album-"+this.ugcId+"/privacy","gossip":"http://www.renren.com/getPrivacy/update?uid="+this.ownerId};
if(this.ugcType=="gossip"){
new XN.net.xmlhttp({url:_afb[this.ugcType],onSuccess:function(r){
var j=r.responseText;
if(j==0||j==3){
that.privacy=1;
}else{
if(j==-1){
that.privacy=2;
}else{
that.privacy=0;
}
}
if(that.privacy==1&&XN.user.id==that.ownerId){
that.privacy=0;
}
cb();
that.doNotCheck=false;
that.check();
},onError:function(){
that.privacy=3;
cb();
that.doNotCheck=false;
that.check();
}});
}else{
new XN.net.xmlhttp({url:_afb[this.ugcType],method:"get",onSuccess:function(r){
var j=XN.json.parse(r.responseText);
that.privacy=j.privacyLevel;
if(that.privacy==1&&XN.user.id==that.ownerId){
that.privacy=0;
}
cb();
that.doNotCheck=false;
that.check();
},onError:function(){
that.privacy=3;
cb();
that.doNotCheck=false;
that.check();
}});
}
}else{
if(this.ugcType=="unknown_privacy"){
this.privacy=2;
cb();
}else{
if(window.asyncHTMLManager&&window.asyncHTMLManager.location.href.indexOf("http://share.renren.com/share/collection")!=-1&&this.ugcType=="share"){
this.privacy=2;
cb();
}else{
this.privacy=0;
cb();
}
}
}
},showTip:function(){
return;
if(XN.cookie.get("at")){
return;
}
var d=$("mentionTip");
var that=this;
if(!d){
var d=$element("div");
d.id="mentionTip";
d.style.cssText="position:absolute;top:-9999px;left:-9999px;width:300px;height:33px;";
document.body.appendChild(d);
d.innerHTML="<div class=\"mention-guide-tip\">"+"<div class=\"tip-content\">"+"\u8fd9\u91cc\u53ef\u4ee5\u8f93\u5165<span style=\"font-weight:bold\">\u201c@\u59d3\u540d\u201d</span>\u6765\u5411\u597d\u53cb\u70b9\u540d\u5566\uff01"+"<a href=\"#nogo\" onclick=\"return false;\" class=\"x-to-hide\" id=\"mentionHideTip\"></a>"+"</div>"+"<div class=\"tip-arrow\"></div>"+"</div>";
$(Sizzle("#mentionTip .x-to-hide")[0]).addEvent("click",function(e){
XN.event.stop(e);
that.hideTip();
});
}
setTimeout(function(){
if(_aa9.mentionTipTimer){
clearInterval(_aa9.mentionTipTimer);
}
_aa9.tip=that.tip=new XN.UI.fixPositionElement({id:d,alignType:"1-4",alignWith:that.input,useIframeInIE6:false});
_aa9.mentionTipTimer=setInterval(function(){
if(that.tip&&that.tip._isShow){
that.tip.refresh();
}else{
clearInterval(_aa9.mentionTipTimer);
}
},100);
},200);
},hideTip:function(){
if(this.tip){
XN.cookie.set("at",1,9999,"/","renren.com");
this.tip.hide();
this.tip=null;
}
}};
});
object.use("xn.mention",function(_b03,xn){
window.Mention=xn.mention.Mention;
});
object.add("xn.appsDropMenu","dom, events, ua",function(_b05,dom,_b07,ua){
var _b09=XN.element.hasClassName;
var _b0a=XN.element.addClass;
var _b0b=XN.element.delClass;
var _b0c=XN.element.realLeft;
var _b0d=XN.element.realTop;
var _b0e=6;
var _b0f=32;
var _b10=12;
var _b11=1;
var _b12=0;
var _b13=null;
var _b14=false;
var _b15=[];
var _b16=0;
var _b17=null;
this.dropInit=function(){
this.oAppDropMenu=$("appDropMenu");
this.oAppsWrap=$("appsMenuPro");
var that=this;
if(!this.oAppDropMenu||!this.oAppsWrap){
return;
}
this.oAppDropMenu.addEvent("mouseover",function(e){
if(window.appsMenuHideTimer){
clearTimeout(window.appsMenuHideTimer);
window.appsMenuHideTimer=null;
}
window.appsMenuShowTimer=setTimeout(function(){
showAppsMenu(e);
},200);
},false);
this.oAppDropMenu.addEvent("mouseleave",function(e){
if(window.appsMenuHideTimer){
clearTimeout(window.appsMenuHideTimer);
window.appsMenuHideTimer=null;
}
if(window.appsMenuShowTimer){
clearTimeout(window.appsMenuShowTimer);
window.appsMenuShowTimer=null;
}
if(XN.browser.IE){
if(this.contains(e.toElement)){
return;
}
}
hideAppsMenu(e);
});
this.oAppsWrap.addEvent("mouseover",function(e){
if(window.appsMenuHideTimer){
clearTimeout(window.appsMenuHideTimer);
window.appsMenuHideTimer=null;
}
},false);
this.oAppsWrap.addEvent("mouseout",function(e){
if(XN.browser.IE){
if(this.contains(e.toElement)){
return;
}
}
hideAppsMenu(e);
},false);
function showAppsMenu(e){
var oNav=Sizzle(".navigation-wrapper",$("navBar"))[0];
if(that.oAppsWrap.children.length==0&&!window.AppsDropMenu._loaded){
window.AppsDropMenu._loaded=true;
new XN.net.xmlhttp({url:"http://apps.renren.com/menu/getNavHtml",method:"get",onSuccess:function(r){
that.oAppsWrap.innerHTML=r.responseText;
that.oAppsWrap.style.left=$("logo2").offsetWidth+"px";
that.oAppsWrap.style.top=oNav.offsetHeight+XN.element.realTop(oNav)+"px";
that.init();
},onError:function(r){
XN.DO.showError("\u8bf7\u6c42\u5e94\u7528\u5217\u8868\u5931\u8d25\uff0c\u8bf7\u7a0d\u540e\u91cd\u8bd5...");
window.AppsDropMenu._loaded=false;
}});
}else{
that.oAppsWrap.style.left=$("logo2").offsetWidth+"px";
that.oAppsWrap.style.top=oNav.offsetHeight+XN.element.realTop(oNav)+"px";
}
if(window.appsMenuShowTimer){
clearTimeout(window.appsMenuShowTimer);
window.appsMenuShowTimer=null;
}
}
function hideAppsMenu(e){
window.appsMenuHideTimer=setTimeout(function(){
$("appsMenuPro").style.left="-9999px";
$("appsMenuPro").style.top="-9999px";
},200);
}
};
this.init=function(){
this.oMyAppsWrap=Sizzle(".my-fav-apps",this.oAppsWrap)[0];
this.oOtherAppsWrap=Sizzle(".other-apps",this.oAppsWrap)[0];
this.oAppItems=Sizzle("li.app-item",this.oAppsWrap);
this._bindEvents();
this.pageCtrl(1);
};
this._bindEvents=function(){
var that=this;
this.oAppsWrap.addEvent("click",function(e){
var _b24=XN.event.element(e);
var _b25=_b24.nodeName.toLowerCase();
if(_b25=="em"){
e.preventDefault();
that.manageFavApp(_b24);
}
if(_b25=="a"&&that.getParent(_b24,"div.page-ctrl")){
e.preventDefault();
if(_b09(_b24,"page-pre")){
if(_b11>1&&!_b09(_b24,"disable")){
that.pageCtrl(_b11-1);
}
}else{
if(_b09(_b24,"page-next")){
if(_b11<3&&!_b09(_b24,"disable")){
that.pageCtrl(_b11+1);
}
}else{
if(_b09(_b24,"page-1")){
if(_b11!=1){
that.pageCtrl(1);
}
}else{
if(_b09(_b24,"page-2")){
if(_b11!=2){
that.pageCtrl(2);
}
}else{
if(_b09(_b24,"page-3")){
if(_b11!=3){
that.pageCtrl(3);
}
}
}
}
}
}
}
},false);
this.oAppsWrap.delegate("li.app-item-dragging","mouseout",function(e){
if(!_b14){
return;
}
var _b27=that.getParent(XN.event.element(e),"li");
if(_b14&&_b27==_b13){
that.resetDraggingItemPos(e);
}
},false);
this.oAppsWrap.delegate("li.app-item a","mousedown",function(e){
e.preventDefault();
that.dragStart(e);
},false);
$(document.body).addEvent("mousemove",function(e){
that.dragProcess(e);
},false);
this.oAppsWrap.addEvent("mouseup",function(e){
that.dragEnd(e);
},false);
$(document.body).addEvent("click",function(e){
var _b2c=XN.event.element(e);
var _b2d=that.getParent(_b2c,"li");
_b16==0;
if(_b2d&&_b2d.getAttribute("data-dragging")){
e.preventDefault();
_b2d.removeAttribute("data-dragging");
}
},false);
if(ua.ua.ie==6){
this.oAppsWrap.delegate("li.app-item a","mouseover",function(e){
var _b2f=XN.event.element(e);
Sizzle("em",this)[0].style.display="block";
if(_b2f.nodeName.toLowerCase()=="em"){
if(that.oMyAppsWrap.contains(_b2f)){
_b2f.style.backgroundPosition="-19px -19px";
}else{
_b2f.style.backgroundPosition="0 -19px";
}
}
},false);
this.oAppsWrap.delegate("li.app-item a","mouseout",function(e){
var _b31=XN.event.element(e);
if(_b31.nodeName.toLowerCase()=="em"){
if(that.oMyAppsWrap.contains(_b31)){
_b31.style.backgroundPosition="-19px 0";
}else{
_b31.style.backgroundPosition="0 0";
}
}
if(this.contains(e.toElement)){
return;
}else{
Sizzle("em",this)[0].style.display="none";
}
},false);
}
};
this.bindDragDropEvent=function(){
for(var i=0,len=this.oAppItems.length;i<len;i++){
this.oAppItems[i].ondragstart=function(e){
};
}
this.oMyAppsWrap.ondragenter=function(e){
};
this.oMyAppsWrap.ondragover=function(e){
};
$("dropHereTest").ondrop=function(e){
alert("fav drop");
};
};
this.manageFavApp=function(_b38){
var _b39=this.getParent(_b38,"li");
if(_b09(_b38,"cancel-fav")){
this.cancelFav(_b39);
}else{
if(_b09(_b38,"to-fav")){
this.fav(_b39);
}
}
};
this.fav=function(_b3a){
var _b3b=_b3a.cloneNode(true);
var _b3c=this.oMyAppsWrap;
var _b3d=Sizzle("ul.apps-list",_b3c)[0];
var _b3e=Sizzle("li.app-item-empty",_b3c);
var _b3f=Sizzle("li[data-holder]",_b3c)[0];
var oBtn=Sizzle("em",_b3b)[0];
var oTip=Sizzle("h4",_b3c)[0];
var _b42=Sizzle("li.app-item",_b3c).length;
var _b43=[];
var _b44=_b3a.getAttribute("data-aid");
if(_b42>=_b0e){
var _b45=Sizzle("li.app-item",_b3d)[_b42-1];
var _b46=Sizzle("ul.apps-list",this.oOtherAppsWrap)[0];
var _b47=Sizzle("em",_b45)[0];
_b45.style.display="";
_b46.insertBefore(_b45,_b46.firstChild);
_b45.setAttribute("data-faved","f");
_b47.className="to-fav";
_b47.setAttribute("title","\u7f6e\u9876");
}
if(_b42>=3){
oTip.style.display="none";
}
oBtn.className="cancel-fav";
oBtn.setAttribute("title","\u53d6\u6d88\u7f6e\u9876");
if(this.cancelFavTimer){
this.clearCancelFavTimer();
}
_b3b.setAttribute("data-faved","t");
if(_b3f){
_b3d.replaceChild(_b3b,_b3f);
}else{
_b3d.insertBefore(_b3b,_b3d.firstChild);
if(_b3e[0]){
$(_b3e[0]).remove();
}
}
$(_b3a).remove();
this.pageCtrl(_b11);
_b43="["+this.getFavOrder(_b3b).join(",")+"]";
_b44=_b3b.getAttribute("data-aid");
new XN.net.xmlhttp({url:"http://apps.renren.com/menu/reorderBookmark.do",method:"post",data:"app_id="+_b44+"&app_ids="+_b43,onSuccess:function(r){
},onError:function(r){
}});
if(ua.ua.ie==6){
Sizzle("em",_b3b)[0].style.display="none";
Sizzle("em",_b3b)[0].style.backgroundPosition="-19px 0";
}
};
this.cancelFav=function(_b4a){
var _b4b=this.oMyAppsWrap;
var _b4c=Sizzle("ul.apps-list",_b4b)[0];
var _b4d=this.oOtherAppsWrap;
var _b4e=Sizzle("ul.apps-list",_b4d)[0];
var _b4f=_b4a.cloneNode(true);
var _b50=parseInt(_b4a.getAttribute("data-aid"));
var _b51=parseInt(_b4a.getAttribute("data-order"));
var oBtn=Sizzle("em",_b4f)[0];
var oTip=Sizzle("h4",_b4b)[0];
var _b54=Sizzle("li.app-item",_b4b).length;
var apps=Sizzle("li.app-item",_b4d);
var _b56=apps.length;
var _b57=1;
var _b58=_b56;
if(this.cancelFavTimer){
this.clearCancelFavTimer();
}
oBtn.className="to-fav";
oBtn.setAttribute("title","\u7f6e\u9876");
_b4f.setAttribute("data-faved","f");
for(var i=0,len=apps.length;i<len;i++){
if(_b51<parseInt(apps[i].getAttribute("data-order"))){
_b58=i;
break;
}
}
_b57=Math.ceil((_b58+1)/12);
if(_b58<_b56){
_b4e.insertBefore(_b4f,apps[_b58]);
}else{
_b4e.appendChild(_b4f);
}
this.pageCtrl(_b11);
_b4a.innerHTML="<span class=\"app-holder place-tip\">\u7b2c"+_b57+"\u9875\u53ef\u627e\u5230</span>";
_b4a.className="app-item-empty";
_b4a.removeAttribute("data-order");
_b4a.removeAttribute("data-aid");
this.cancelFavTimer=setTimeout(function(){
_b4a.innerHTML="<span class=\"app-holder\">\u62d6\u5165</span>";
_b4c.appendChild(_b4a);
if(_b54<=4){
oTip.style.display="";
}
if(this.cancelFavTimer){
this.cancelFavTimer=null;
}
},2000);
new XN.net.xmlhttp({url:"http://apps.renren.com/menu/removeBookmark.do",method:"post",data:"app_id="+_b50,onSuccess:function(r){
},onError:function(r){
}});
if(ua.ua.ie==6){
Sizzle("em",_b4f)[0].style.display="none";
Sizzle("em",_b4f)[0].style.backgroundPosition="0 0";
}
};
this.dragStart=function(e){
var _b5e=XN.event.element(e);
var _b5f=this.getParent(_b5e,"li");
if(!_b5f){
return;
}
if(_b5e.nodeName.toLowerCase()=="em"&&_b5f){
return;
}
if(_b15.length==0){
this.getFavItemsPos();
}
_b14=true;
_b13=_b5f;
};
this.dragProcess=function(e){
if(!_b14||!_b13){
return;
}
var _b61=XN.event.element(e);
var _b62=this.getParent(_b61,"li");
if(!_b62&&!_b13){
return;
}
if(_b16==0){
_b16=1;
return;
}
if(!_b13.getAttribute("data-dragging")){
_b13=_b62.cloneNode(true);
var _b63;
if(_b13.getAttribute("data-faved")=="t"){
_b63=document.createElement("li");
_b63.className="app-item-empty";
_b63.innerHTML="<span class=\"app-holder\">\u62d6\u5165</span>";
_b63.setAttribute("data-holder","t");
_b62.parentNode.replaceChild(_b63,_b62);
}else{
_b63=_b62.cloneNode(true);
_b63.setAttribute("data-holder","t");
_b0a(_b63,"holder-alpha");
_b62.parentNode.replaceChild(_b63,_b62);
}
this.oAppsWrap.appendChild(_b13);
_b13.style.position="absolute";
_b13.style.left=(XN.element.realLeft(_b63)-XN.element.realLeft(this.oAppsWrap))+"px";
_b13.style.top=(XN.element.realTop(_b63)-XN.element.realTop(this.oAppsWrap))+"px";
_b13.className="app-item-dragging";
_b13.setAttribute("data-dragging","t");
}else{
this.resetDraggingItemPos(e);
if(this.isInFavBox(e)){
if(this.cancelFavTimer){
this.clearCancelFavTimer();
}
var _b64=this.getFavToIndex(_b13);
this.addFavAppHolder(_b64);
}
}
};
this.dragEnd=function(e){
_b14=false;
if(!_b13||_b13.getAttribute("data-dragging")!="t"){
return;
}
var aid=_b13.getAttribute("data-aid");
var _b67;
var _b68=_b13.getAttribute("data-faved");
var _b69=Sizzle("ul.apps-list",this.oMyAppsWrap)[0];
var _b6a=Sizzle("li.app-item",_b69);
var oTip=Sizzle("h4",this.oMyAppsWrap)[0];
var _b6c=Sizzle("li.app-item",_b69).length;
if(this.isInFavBox(e)){
if(_b68=="f"){
_b67=Sizzle("li[data-holder=t]",this.oOtherAppsWrap)[0];
_b0b(_b67,"holder-alpha");
_b67.removeAttribute("data-holder");
this.fav(_b67);
_b13.remove();
}else{
_b67=Sizzle("li[data-holder=t]",_b69)[0];
_b69.replaceChild(_b13,_b67);
_b13.style.cssText="";
_b13.className="app-item";
_b13.removeAttribute("data-dragging");
if(_b6c<3){
oTip.style.display="";
}else{
oTip.style.display="none";
}
var _b6d="["+this.getFavOrder().join(",")+"]";
new XN.net.xmlhttp({url:"http://apps.renren.com/menu/reorderBookmark.do",method:"post",data:"app_ids="+_b6d,onSuccess:function(r){
},onError:function(r){
}});
}
}else{
if(_b68=="f"){
_b67=Sizzle("li[data-aid="+aid+"]",this.oAppsWrap)[0];
oFavHolder=Sizzle("li[data-holder]",this.oMyAppsWrap)[0];
if(_b6a.length==_b0e){
_b6a[5].style.display="";
if(oFavHolder){
oFavHolder.remove();
}
}else{
if(oFavHolder){
_b69.appendChild(oFavHolder);
oFavHolder.removeAttribute("data-holder");
}
}
_b0b(_b67,"holder-alpha");
_b67.removeAttribute("data-holder");
$(_b13).remove();
}else{
_b67=Sizzle("li[data-holder=t]",_b69)[0];
_b67.parentNode.replaceChild(_b13,_b67);
_b13.style.cssText="";
_b13.className="app-item";
_b13.removeAttribute("data-dragging");
this.cancelFav(_b13);
}
}
_b13=null;
};
this.getFavItemsPos=function(){
};
this.getParent=function(ele,_b71){
var _b72=$(ele);
var _b73=XN.element.matchesSelector;
while(!_b73(_b72,_b71)){
if(_b72.nodeName.toLowerCase()=="body"){
return null;
}
_b72=$(_b72.parentNode);
}
return _b72;
};
this.isInFavBox=function(e){
var _b75=this.oMyAppsWrap;
var x=XN.event.pointerX(e)||e.page.x;
var y=XN.event.pointerY(e)||e.page.y;
var _b78={left:XN.element.realLeft(_b75),top:XN.element.realTop(_b75),right:XN.element.realLeft(_b75)+_b75.offsetWidth,bottom:XN.element.realTop(_b75)+_b75.offsetHeight};
if(x>_b78.left&&x<_b78.right&&y>_b78.top&&y<_b78.bottom){
return true;
}else{
return false;
}
};
this.getFavItemsPos=function(){
var _b79=Sizzle("li",this.oMyAppsWrap);
var _b7a=_b79[0].offsetWidth;
var _b7b=_b79[0].offsetHeight;
for(var i=0,len=_b79.length;i<len;i++){
var _b7e={};
_b7e.left=_b0c(_b79[i]);
_b7e.top=_b0d(_b79[i]);
_b7e.right=_b0c(_b79[i])+_b7a;
_b7e.bottom=_b0d(_b79[i])+_b7b;
_b15.push(_b7e);
_b7e=null;
}
};
this.getItemPos=function(_b7f){
var pos={};
var _b81=_b7f.offsetWidth;
var _b82=_b7f.offsetHeight;
pos.left=_b0c(_b7f);
pos.top=_b0d(_b7f);
pos.right=_b0c(_b7f)+_b81;
pos.bottom=_b0d(_b7f)+_b82;
return pos;
};
this.getFavToIndex=function(_b83){
var _b84=this.getItemPos(_b83);
var _b85=_b83.getAttribute("data-faved");
var _b86=Sizzle("li.app-item",this.oMyAppsWrap);
var _b87=Sizzle("li",this.oMyAppsWrap);
var len=_b15.length;
var _b89=len-1;
var _b8a=10000;
for(var i=0;i<len;i++){
if(Math.abs(_b84.left-_b15[i].left)<_b8a){
_b8a=Math.abs(_b84.left-_b15[i].left);
_b89=i;
}
}
if(_b89>=_b86.length){
_b89=_b86.length;
}
return _b89;
};
this.addFavAppHolder=function(_b8c){
var _b8d=Sizzle("ul.apps-list",this.oMyAppsWrap)[0];
var _b8e=Sizzle("li.app-item",_b8d);
var _b8f=Sizzle("li",_b8d);
var _b90=Sizzle("li.app-item-empty[data-holder=t]",_b8d)[0];
if(!_b90){
_b90=Sizzle("li.app-item-empty",_b8d)[0];
}
if(_b90){
if(_b8e[_b8c]){
_b8d.insertBefore(_b90,_b8e[_b8c]);
}else{
if(_b8f[_b8c+1]){
_b8d.insertBefore(_b90,_b8f[_b8c+1]);
}else{
_b8d.appendChild(_b90);
}
}
}else{
_b90=document.createElement("li");
_b90.innerHTML="<span class=\"app-holder\">\u62d6\u5165</span>";
_b0a(_b90,"app-item-empty");
_b8d.insertBefore(_b90,_b8e[_b8c]);
_b8e[_b0e-1].style.display="none";
}
_b90.setAttribute("data-holder","t");
};
this.removeFavAppHolder=function(_b91){
};
this.pageCtrl=function(num){
var box=Sizzle("ul.apps-list",this.oOtherAppsWrap)[0];
var oLis=Sizzle("li",box);
var _b95=Sizzle("div.page-ctrl",this.oAppsWrap)[0];
var _b96=Sizzle("a.page-pre",_b95)[0];
var _b97=Sizzle("a.page-next",_b95)[0];
var _b98=Math.ceil(oLis.length/_b10);
var _b99=(_b11-1)*_b10;
var _b9a=_b99+_b10-1;
var _b9b=(num-1)*_b10;
var _b9c=_b9b+_b10-1;
var _b9d=box.cloneNode(true);
var _b9e=$("appsRallWrap");
var _b9f=null;
var _ba0=3;
if(oLis.length==0){
this.pageSet(0);
return;
}else{
if(oLis.length==6){
this.pageSet(1);
return;
}else{
if(oLis.length==7){
this.pageSet(1);
return;
}
}
}
for(var i=0,len=oLis.length;i<len;i++){
oLis[i].style.display="none";
}
while(_b9b<=_b9c&&oLis[_b9b]){
oLis[_b9b].style.display="";
_b9b++;
}
if(num<_b11){
rull("right");
}else{
if(num>_b11){
rull("left");
}
}
_b0b(Sizzle("a.page-"+_b11,_b95)[0],"act");
_b0a(Sizzle("a.page-"+num,_b95)[0],"act");
if(num==1){
_b0a(_b96,"disable");
}else{
_b0b(_b96,"disable");
}
if(num==_b98){
_b0a(_b97,"disable");
}else{
_b0b(_b97,"disable");
}
_b11=num;
_b9f=Sizzle("li.app-item",box);
_ba0=Math.ceil(_b9f.length/12);
if(_ba0!=_b12){
this.pageSet(_ba0);
}
if(_b11>_ba0){
this.pageCtrl(_ba0);
}
function rull(_ba3){
if(window.dropAppsRullTmpTimer||window.dropAppsRullTimer){
clearTimeout(window.dropAppsRullTmpTimer);
clearTimeout(window.dropAppsRullTimer);
window.dropAppsRullTmpTimer=null;
window.dropAppsRullTimer=null;
}
var _ba4=_ba3=="left"?-397:397;
var _ba5=_ba3=="left"?-45:45;
var _ba6=25;
if(!_b9e){
_b9e=$element("div");
_b9e.setAttribute("id","appsRallWrap");
_b9e.style.display="none";
box.parentNode.appendChild(_b9e);
}
_b9e.innerHTML="";
_b9e.appendChild(_b9d);
_b9e.style.display="";
_b9d.style.marginLeft=_ba5+"px";
var _ba7=window.dropAppsRullTmpTimer=setInterval(function(){
var left=_b9d.style.marginLeft.split("px")[0];
if(Math.abs(parseInt(left)-_ba4)>Math.abs(_ba5)){
_b9d.style.marginLeft=parseInt(left)+_ba5+"px";
}else{
clearInterval(_ba7);
_b9e.style.display="none";
_b9e.innerHTML="";
_b9d=null;
}
},_ba6);
box.style.marginLeft=(0-_ba4)+"px";
var _ba9=window.dropAppsRullTimer=setInterval(function(){
var left=box.style.marginLeft.split("px")[0];
if(Math.abs(parseInt(left))>Math.abs(_ba5)){
box.style.marginLeft=parseInt(left)+_ba5+"px";
}else{
box.style.marginLeft="2px";
clearInterval(_ba9);
}
},_ba6);
}
};
this.pageSet=function(_bab){
var _bac=Sizzle("div.page-ctrl",this.oAppsWrap)[0];
var _bad=Sizzle("a.page-1",_bac)[0];
var _bae=Sizzle("a.page-2",_bac)[0];
var _baf=Sizzle("a.page-3",_bac)[0];
var _bb0=Sizzle("a.page-pre",_bac)[0];
var _bb1=Sizzle("a.page-next",_bac)[0];
var _bb2=Sizzle("p.apps-tips",this.oAppsWrap)[0];
var _bb3=Sizzle("a.apps-center-btn",this.oAppsWrap)[0];
var _bb4=Sizzle("li.app-item",this.oOtherAppsWrap).length;
switch(_bab){
case 0:
_bac.style.display="none";
_bb2.style.display="";
_bb3.style.display="";
break;
case 1:
_bad.style.display="";
_bae.style.display="none";
_baf.style.display="none";
_b0a(_bb1,"disable");
_b0a(_bb0,"disable");
if(_bb4<=6){
_bac.style.display="none";
_bb3.style.display="";
_bb2.style.display="";
}else{
_bac.style.display="";
_bb3.style.display="none";
_bb2.style.display="none";
}
break;
case 2:
_bad.style.display="";
_bae.style.display="";
_baf.style.display="none";
_bac.style.display="";
_bb2.style.display="none";
_bb3.style.display="none";
break;
case 3:
_bad.style.display="";
_bae.style.display="";
_baf.style.display="";
_bac.style.display="";
_bb2.style.display="none";
_bb3.style.display="none";
break;
}
_b12=_bab;
};
this.getItemPageIndex=function(_bb5){
var apps=Sizzle("li.app-item",this.oOtherAppsWrap);
var _bb7=apps.length;
var _bb8=1;
var _bb9=_bb7;
_bb8=Math.ceil((_bb9+1)/12);
};
this.getFavOrder=function(){
var apps=Sizzle("li.app-item",this.oMyAppsWrap);
var _bbb=[];
for(var i=0,len=apps.length;i<len;i++){
_bbb.push(apps[i].getAttribute("data-aid"));
}
return _bbb;
};
this.resetDraggingItemPos=function(e){
var x=XN.event.pointerX(e)||e.page.x;
var y=XN.event.pointerY(e)||e.page.y;
_b13.style.left=(x-XN.element.realLeft(this.oAppsWrap)-20)+"px";
_b13.style.top=(y-XN.element.realTop(this.oAppsWrap)-20)+"px";
};
this.clearCancelFavTimer=function(){
var _bc1=Sizzle("ul.apps-list",this.oMyAppsWrap)[0];
var _bc2=Sizzle("li.app-item-empty",_bc1);
if(this.cancelFavTimer){
_bc2[0].innerHTML="<span class=\"app-holder\">\u62d6\u5165</span>";
_bc2[0].removeAttribute("data-holder");
_bc1.appendChild(_bc2[0]);
clearTimeout(this.cancelFavTimer);
this.cancelFavTimer=null;
}
};
this.setDraggingItem=function(type){
if(!type||!_b13){
return;
}
var tmpA=Sizzle("a",_b13)[0];
Sizzle("em",_b13)[0].style.display="none";
if(type=="add"){
tmpA.style.border="0";
tmpA.style.backgroundColor="inherit";
tmpA.style.boxShadow="none";
_b13.setAttribute("data-dragging","t");
}
};
this.addHolder=function(_bc5){
};
this.removeHolder=function(_bc6){
};
this.debug=function(con){
var o=$("debug");
o.value=con+"\n"+o.value;
};
});
object.use("xn.appsDropMenu",function(_bc9,xn){
window.AppsDropMenu=xn.appsDropMenu;
});
object.use("dom, ua, ua.extra, ua.flashdetect",function(_bcb,dom,ua){
var str="?";
var core=ua.ua.core;
var _bd0=ua.ua.shell;
var _bd1=ua.ua[core];
if(_bd1){
str+="&"+(core+"="+_bd1);
}
var _bd2=ua.ua[_bd0];
if(_bd2){
str+="&"+(_bd0+"="+_bd2);
}
if(_bd0!="ieshell"&&ua.ua.ieshell){
str+="&ieshell="+ua.ua.ieshell;
}
var _bd3=ua.flashdetect.getFlashVersion();
if(_bd3){
str+="&"+("flash="+_bd3);
}
XN.net.sendStats("http://s.renren.com/speedstats/browser/stats.php"+str);
var desc,url,key=1;
var _bd7={"se360":"360\u5b89\u5168\u6d4f\u89c8\u5668","sogou":"\u641c\u72d7\u6d4f\u89c8\u5668","maxthon":"\u50b2\u6e38\u6d4f\u89c8\u5668","theworld":"\u4e16\u754c\u4e4b\u7a97\u6d4f\u89c8\u5668","qqbrowser":"QQ\u6d4f\u89c8\u5668","tt":"\u817e\u8bafTT\u6d4f\u89c8\u5668"};
var _bd0=_bd7[ua.ua.shell]||"\u517c\u5bb9\u6d4f\u89c8\u5668";
if(ua.ua.ie>=6&&ua.ua.ie<7){
var now=new Date().getTime();
if(now>=1309503600000&&now<=1309514400000&&XN.cookie.get("fie")!=2){
key=2;
url="http://noie6.renren.com/";
desc="\u4eba\u4eba\u7f51\u6e29\u99a8\u63d0\u793a\uff1a\u4f18\u5316\u4e0a\u7f51\u4f53\u9a8c\uff0c\u4f53\u9a8c\u6781\u901f\u4e4b\u65c5 <a href=\"http://noie6.renren.com/down/360cse-promote\" style=\"text-decoration:none\"><img src=\"http://a.xnimg.cn/sites/noie6/res/browsers/360cse-icon.png\" style=\"vertical-align:text-bottom\" /> 360\u6781\u901f\u6d4f\u89c8\u5668</a>&nbsp;&nbsp;&nbsp;<a href=\"http://noie6.renren.com/down/sogou-promote\" style=\"text-decoration:none\"><img src=\"http://a.xnimg.cn/sites/noie6/res/browsers/sogou-icon.png\" style=\"vertical-align:text-bottom\" /> \u641c\u72d7\u9ad8\u901f\u6d4f\u89c8\u5668</a>";
}else{
if(!XN.cookie.get("fie")){
if(ua.ua.shell=="ieshell"){
url="http://noie6.renren.com/";
desc="\u81f4IE6\u7528\u6237\u7684\u4e00\u5c01\u4fe1";
}else{
url="http://dl.xnimg.cn/down/IE8-WindowsXP-x86-CHS.exe";
desc="\u5c0a\u656c\u7684\u7528\u6237\uff0c\u60a8\u76ee\u524d\u4f7f\u7528\u7684\u662fIE6\u5185\u6838\u7684"+_bd0+"\uff0c\u4e3a\u4e86\u7ed9\u60a8\u5e26\u6765\u66f4\u5feb\u901f\u3001\u66f4\u5b89\u5168\u3001\u66f4\u4f18\u8d28\u7684\u4f53\u9a8c\uff0c\u4eba\u4eba\u7f51\u5c06\u9010\u6b65\u964d\u4f4eIE6\u5185\u6838\u7684\u652f\u6301\uff0c\u6211\u4eec\u5efa\u8bae\u60a8\u5c3d\u5feb<a href=\""+url+"\">\u5347\u7ea7\u60a8\u7684\u7cfb\u7edf\u6d4f\u89c8\u5668\u4e3aIE8</a>\uff0c\u8fd9\u4e0d\u4f1a\u5bf9\u60a8\u4f7f\u7528"+_bd0+"\u4ea7\u751f\u4efb\u4f55\u5f71\u54cd\uff0c\u611f\u8c22\u60a8\u7684\u652f\u6301\u3002";
}
}
}
if(url&&desc){
dom.ready(function(){
var div=document.getElementById("ie6notice");
if(div){
div.innerHTML="<div style=\"position:relative;\"><div onclick=\"window.open('"+url+"');\" style=\"cursor:pointer;background:#FFFBC1;border-bottom:1px solid #F9B967;padding:5px;text-align:center;font-size:14px;\"><div style=\"width:965px;padding-right: 15px;\">"+desc+"</div></div><a href=\"#nogo\" onclick=\"XN.cookie.set('fie',"+key+",30,'/','renren.com');$('ie6notice').hide();return false;\" class=\"x-to-hide\" style=\"height:14px;width:14px;overflow:hidden;position:absolute;top:8px;right:10px;\" title=\"\u5173\u95ed\"></a></div>";
}
});
}
}
});
object.use("net",function(_bda,net){
var _bdc=window.location.hostname;
_bda.handleClientError=function(){
if(_bdc.indexOf("renren.com")==-1){
return true;
}
if(arguments.length!==3||arguments[2]===0){
return true;
}
var xhr=new net.Request({onsuccess:function(_bde){
},onerror:function(_bdf){
}});
xhr.method="GET";
xhr.url="http://s.renren.com/speedstats/jserror/stats.php?"+"message="+encodeURIComponent(arguments[0])+"&url="+encodeURIComponent(arguments[1])+"&lineNo="+arguments[2]+"&time="+getCurrentTimeString();
xhr.send(null);
return true;
function getCurrentTimeString(){
var date=new Date();
var _be1=date.getHours()+":"+date.getMinutes()+":"+date.getSeconds();
return _be1;
}
};
});
XN.dom.ready(function(){
XN.event.addEvent(document,"mouseover",function(e){
var _be3=$(XN.event.element(e||window.event));
if(!_be3.hasClassName("share_new")){
return false;
}
if(!window.XNShareObject){
setTimeout(function(){
XN.loadFile("http://s.xnimg.cn/jspro/xn.app.share.js",function(){
XNShareObject._register({autoRegister:false,floatMode:true});
XNShareObject.forceShowFloat(_be3);
});
},0);
}
});
});
(function(){
XN.namespace("XN.flashUpload");
var _be4,_be5,_be6,dlEl,_be8,_be9,_bea,_beb,_bec,_bed,_bee,_bef,_bf0,_bf1={},_bf2,XNEV=XN.event,_bf4,_bf5,_bf6,_bf7,_bf8,_bf9,_bfa,_bfb,_bfc,_bfd,_bfe,_bff,_c00,_c01,_c02,_c03,_c04,_c05,_c06,isIE,_c08=false;
function showAd(ad){
$("activityTipFlashUploader").innerHTML=ad;
$("activityTipFlashUploader").style.display="";
}
function activities(u){
try{
new XN.net.xmlhttp({method:"GET",url:u,onSuccess:function(r){
var _c0c=XN.JSON.parse(r.responseText);
if(_c0c.code==0){
if(_c0c.isActive==1){
showAd(_c0c.msg);
}
}
}});
}
catch(e){
}
}
function sbUser(){
$("popUploadTip").style.display="";
setTimeout(function(){
$("popUploadTip").style.display="none";
},5000);
}
function reLocate(){
var w=this.frame;
var s=XN.event.scrollTop();
var _c0f=(XN.event.winHeight()-w.offsetHeight)/2;
_c0f=(_c0f<=0)?s:_c0f+s;
w.style.top=_c0f+"px";
}
function getToken(){
new XN.net.xmlhttp({method:"GET",url:"http://upload.renren.com/upload/ticket?pagetype=addphotoflash",onSuccess:function(r){
_c06=r.responseText;
_bf0.setUploadUrl("http://upload.renren.com/upload.fcgi?pagetype=addphotoflash&hostid="+_bf2+"&tick="+_c06);
}});
}
function flashGrowUp(){
var rows,_c12;
rows=Math.ceil((1+_bf5)/7);
if(rows>1){
_c12=103*rows;
$("slogan").style.display="none";
}else{
$("slogan").style.display="";
_c12=100;
}
if(isIE){
_bf0.height=_c12;
}
}
function showActivex(){
var obj;
try{
obj=new ActiveXObject("rralbum.Uploader.4");
}
catch(e){
obj=new ActiveXObject("xnalbum.Uploader.4");
}
obj.appTitle="\u63a7\u4ef6\u4e0a\u4f20";
obj.url="http://upload.renren.com/uploadservice.fcgi?pagetype=addPhotoX";
var _c14=_bf9[0].id;
if(_c14!==undefined){
obj.targetAlbumId=_c14;
}
obj.uid=_bf2;
obj.onstatechange=function(_c15){
location.href=" http://photo.renren.com/editphotolist.do?id="+_c15;
};
obj.show();
}
function isInstalledActiveXObject(){
try{
_c05=new ActiveXObject("rralbum.Uploader.4");
return true;
}
catch(e){
try{
_c05=new ActiveXObject("xnalbum.Uploader.4");
return true;
}
catch(e){
return false;
}
}
}
function detectIEUserAndActiveX(){
if(!XN.browser.IE){
$("isIE").style.display="none";
}else{
$("isIE").style.display="";
}
}
function onbeforeunload_handler(e){
if(_c04==1){
(e||window.event).returnValue="\u672a\u5b8c\u6210\u4e0a\u4f20\uff0c\u6b64\u65f6\u5173\u95ed\u5c06\u4e22\u5931\u6b63\u5728\u4e0a\u4f20\u7684\u6240\u6709\u56fe\u7247 \uff0c\u786e\u5b9a\u8981\u79bb\u5f00\u5417\uff1f";
}
}
function addLiHover(){
var _c17=$("picUl"),_c18=Sizzle("li",_c17);
for(var i=0;i<_c18.length;i++){
var el=$(_c18[i]);
if(el.getAttribute("hoverHandler")=="ok"){
}else{
el.setAttribute("hoverHandler","ok");
XN.event.addEvent(el,"mouseover",function(){
$(Sizzle("div.photo-del",el)[0]).style.visibility="hidden";
$(Sizzle("div.upload-state",el)[0]).style.visibility="visible";
});
}
}
}
function addEvent2AlbumList(){
XNEV.addEvent("albumNameList","click",function(e){
var e=e||window.event;
e.preventDefault();
var el=XNEV.element(e);
if(el.nodeName=="SPAN"){
el=el.parentNode;
}
var seq=parseInt(el.getAttribute("seq"));
_bf1.id=_bf9[seq].id;
_bf1.name=_bf9[seq].name;
_bee.innerHTML=Sizzle("span",el)[0].innerHTML;
_bef.innerHTML=Sizzle("span",el)[1].innerHTML;
_bee.parentNode.setAttribute("seq",seq);
$("appointAlbum").delClass("selected");
});
}
function albumSearch(_c1e,_c1f,_c20,_c21){
var _c1e=Sizzle("dd",_c1e);
XNEV.addEvent(_c20,"keyup",function(e){
var _c23=_c20.value;
for(var i=0;i<_c21.length;i++){
if(_c23!=""&&_c21[i].name.indexOf(_c23)!=-1){
}else{
if(_c23==""){
$(_c1e[i].firstChild).style.display="";
}else{
$(_c1e[i].firstChild).style.display="none";
}
}
}
});
}
function upload2Album(el){
var el=el,seq=parseInt(_be9.getAttribute("seq"));
$("albumList").style.display="";
_be8.style.display="none";
el.innerHTML="\u521b\u5efa\u65b0\u76f8\u518c";
$("newOrOld").innerHTML="\u4e0a\u4f20\u5230\uff1a";
el.id="newAlbum";
_bf1.name=_bf9[seq].name;
_bf1.id=_bf9[seq].id;
_bf1.flag=0;
_bf1.passwordProtected=false;
albumSearch(_beb,_be9,_bec,_bf9);
}
function creatDefaultAalbum(el){
var el=el;
$("albumList").style.display="none";
_be8.style.display="";
el.innerHTML="\u4e0a\u4f20\u5230\u5df2\u6709\u76f8\u518c";
$("albumList").style.display="none";
_be8.style.display="";
el.id="oldAlbum";
$("newOrOld").innerHTML="\u65b0\u5efa\u76f8\u518c\uff1a";
_bf1.flag=1;
_bf1.name=defaultAlbumGen();
_bf1.id=0;
}
function toggleAlbum(el){
if(el.id=="oldAlbum"){
upload2Album(el);
}else{
if(el.id=="newAlbum"){
creatDefaultAalbum(el);
$("albumTitle").select();
}
}
}
function albumListGen(_c29){
var _c2a=[];
new XN.net.xmlhttp({url:"http://photo.renren.com/photo/"+parseInt(_c29)+"/album/common/ajax",method:"GET",onSuccess:function(r){
r=XN.json.parse(r.responseText);
_bf9=r.list;
for(var i=0,key=0;i<_bf9.length;i++){
if(_bf9[i].photoCount<120){
if(key==0){
_bee.innerHTML=_bf9[i].name;
_bef.innerHTML="("+_bf9[i].photoCount+")";
_bee.parentNode.setAttribute("seq",i);
key=1;
}
_c2a[i]="<dd><a id=\""+_bf9[i].id+"\" seq=\""+i+"\" href=\"###\"><span class=\"album-name\">"+_bf9[i].name+"</span><span class=\"photo-num-flashUploader\">("+_bf9[i].photoCount+")</span></a></dd>";
if(_bf9[i].id==_c00){
_bee.innerHTML=_bf9[i].name;
_bef.innerHTML="("+_bf9[i].photoCount+")";
_bee.parentNode.setAttribute("seq",i);
}
}
}
_beb.innerHTML=_c2a.join("");
$(Sizzle("span.all-album")[0]).innerHTML="\u5171"+_bf9.length+"\u4e2a\u76f8\u518c";
if(_c00!=0){
toggleAlbum($(Sizzle("a.toggleAlbum")[0]));
}
addEvent2AlbumList();
}});
}
function defaultAlbumGen(){
var _c2e=new Date(),_c2f=_c2e.getFullYear()+"\u5e74"+(_c2e.getMonth()+1)+"\u6708"+_c2e.getDate()+"\u65e5";
$("albumTitle").value=_c2f;
_bf1.flag=1;
return _c2f;
}
function addPhotoData(obj){
_bf8.push(obj);
return _bf8;
}
function delPhotoData(obj){
var id=obj.file.id;
for(var i=0;i<_bf8.length;i++){
if(_bf8[i].tempID==id){
_bf8.splice(i,1);
break;
}
}
--_bf5;
flashGrowUp();
if($(id).getAttribute("status")=="ed"){
--_bf4;
}
if($(id).getAttribute("status")=="err"){
--_bf6;
}
$(id).remove();
ajProgressBar(_bf4+_bf6,_bf5);
if(_bf6+_bf4==_bf5){
_bf7=1;
}
if(_bf7){
$("uploadFinish").delClass("gray-btn-flashUploader");
if(_bf5==0){
$("uploadFinish").addClass("gray-btn-flashUploader");
_bf7=0;
}
$(Sizzle("div.progress-bar-box")[0]).style.display="none";
if(_bf6==0){
$("nowLoadingNum").innerHTML="\u6210\u529f\u4e0a\u4f20"+_bf4+"\u5f20\uff01";
}else{
$("nowLoadingNum").innerHTML="\u6210\u529f\u4e0a\u4f20"+_bf4+"\u5f20\uff0c\u5931\u8d25"+_bf6+"\u5f20\uff01";
}
}
return id;
}
function delPhoto(e){
var id=e.parentNode.parentNode.id;
_bf0.cancelFile(id);
}
function changeStyle2ing(obj){
_bf7=0;
}
function operateDom2(obj){
var id=obj.file.id,_c39=$(id),_c3a=Sizzle("span",_c39)[0],_c3b=Sizzle("div.load-ico",_c39)[0],_c3c=Sizzle("div.pic-oper",_c39)[0];
var _c3d=new Date(),_c3e=_c3d.getTime();
_c3a.innerHTML="\u4e0a\u4f20\u4e2d";
_c3b.style.display="";
_c3c.style.display="none";
_c39.setAttribute("status","ing");
$("uploadFinish").addClass("gray-btn-flashUploader");
$(Sizzle("p.fileName",_c39)[0]).style.display="none";
$(Sizzle("div.upload-state-box",_c39)[0]).style.display="block";
_bf7=0;
var _c3f=new Date(),_c40=_c3f.getTime();
}
function changeStyle2pros(obj){
setTimeout(function(){
operateDom2(obj);
},0);
return true;
}
function operateDom(obj){
var id=obj.file.id,_c44=$(id),_c45=Sizzle("span",_c44)[0],_c46=Sizzle("div.load-ico",_c44)[0],_c47=Sizzle("img",_c44)[0],_c48=Sizzle("div.pic-oper",_c44)[0],_c49;
var _c4a=new Date(),_c4b=_c4a.getTime();
$extend(obj.response.files[0],{"tempID":id});
addPhotoData(obj.response.files[0]);
_c49="http://fmn.rrimg.com/"+obj.response.files[0].images[3].url;
var _c4c=new Image();
_c4c.onload=function(){
_c47.style.backgroundImage="url("+_c49+")";
$(_c47).delClass("alphaIMG");
_c4c.onload=null;
};
_c4c.src=_c49;
_c45.innerHTML="\u5b8c\u6210";
$(_c45).addClass("upload-done");
_c46.style.display="none";
_c48.style.display="";
++_bf4;
ajProgressBar(_bf4+_bf6,_bf5);
_c44.setAttribute("status","ed");
if(_bf6+_bf4==_bf5){
_bf7=1;
$("uploadFinish").delClass("gray-btn-flashUploader");
$(Sizzle("div.progress-bar-box")[0]).style.display="none";
if(_bf6==0){
$("nowLoadingNum").innerHTML="\u6210\u529f\u4e0a\u4f20"+_bf4+"\u5f20\uff01";
}else{
$("nowLoadingNum").innerHTML="\u6210\u529f\u4e0a\u4f20"+_bf4+"\u5f20\uff0c\u5931\u8d25"+_bf6+"\u5f20\uff01";
}
}
}
function changeStyle2ed(obj){
obj.response=XN.JSON.parse(obj.response);
setTimeout(function(){
operateDom(obj);
},0);
return true;
}
function changeStyle2netErr(){
XN.DO.alert({title:"\u63d0\u793a",message:"\u7f51\u7edc\u9519\u8bef\uff0c\u53ef\u80fd\u7531\u4e8e\u4ee5\u4e0b\u539f\u56e0\u5bfc\u81f4\uff1a<br />"+"1.\u60a8\u7684\u7f51\u7edc\u6682\u65f6\u51fa\u95ee\u9898\u4e86<br />"+"2.\u5982\u679c\u591a\u6b21\u51fa\u73b0\uff0c\u8bf7\u5148\u4f7f\u7528<a href=\"http://upload.renren.com/addphotoPlain.do\">\u5176\u4ed6\u4e0a\u4f20</a>"});
}
function changeStyle2singleErr(id){
var _c4f=$(id),_c50=Sizzle("div.pic-oper",_c4f)[0],_c51=Sizzle("span",_c4f)[0];
_c51.innerHTML="\u4e0a\u4f20\u9519\u8bef";
++_bf6;
_c50.style.display="";
if(_bf6+_bf4==_bf5){
$("uploadFinish").delClass("gray-btn-flashUploader");
_bf7=1;
}
$(Sizzle("div.load-ico",_c4f)[0]).remove();
}
function ajProgressBar(x,y){
if(y==0){
return false;
}
var _c54=parseInt((x/y)*100);
if(isIE){
_be4.style.display="none";
_be4.style.width=_c54+"%";
_be4.style.display="";
}
_be4.style.width=_c54+"%";
_be5.innerHTML=x+"/"+y;
_be6.innerHTML="\u6b63\u5728\u4e0a\u4f20"+y+"\u5f20\u7167\u7247";
}
function uploadError(obj){
var _c56=obj.errorCode,_c57=obj.file.id;
changeStyle2singleErr(_c57);
}
function queuedError(obj){
var _c59;
for(var i=0;i<obj.files.length;i++){
_c59=$(obj.files[i].id);
$(Sizzle("p.fileName",_c59)[0]).style.display="none";
$(Sizzle("div.error-state",_c59)[0]).style.display="";
$(Sizzle("div.upload-state-box",_c59)[0]).style.display="none";
$(Sizzle("div.pic-oper",_c59)[0]).style.display="";
$(Sizzle("div.load-ico",_c59)[0]).style.display="none";
if(obj.files[i].errorType=="zeroByteFile"){
++_bf6;
$(Sizzle("div.error-state",_c59)[0]).innerHTML="\u56fe\u7247\u5927\u5c0f\u4e3a0";
_c59.setAttribute("status","err");
}else{
if(obj.files[i].errorType=="fileExceedsSizeLimit"){
++_bf6;
$(Sizzle("div.error-state",_c59)[0]).innerHTML="\u56fe\u7247\u5927\u5c0f\u8d85\u8fc78M";
_c59.setAttribute("status","err");
}
}
ajProgressBar(_bf4+_bf6,_bf5);
if(_bf6+_bf4==_bf5){
_bf7=1;
$("uploadFinish").delClass("gray-btn-flashUploader");
$(Sizzle("div.progress-bar-box")[0]).style.display="none";
if(_bf6==0){
$("nowLoadingNum").innerHTML="\u6210\u529f\u4e0a\u4f20"+_bf4+"\u5f20\uff01";
}else{
$("nowLoadingNum").innerHTML="\u6210\u529f\u4e0a\u4f20"+_bf4+"\u5f20\uff0c\u5931\u8d25"+_bf6+"\u5f20\uff01";
}
}
}
}
function queueLimitExceeded(obj){
XN.DO.alert({title:"\u63d0\u793a",message:"\u6bcf\u6b21\u6700\u591a\u4e0a\u4f20100\u5f20\u7167\u7247\uff0c\u9ed8\u8ba4\u5728\u4f60\u9009\u62e9\u7684"+obj.selected+"\u5f20\u7167\u7247\u4e2d\u9009\u4e2d\u524d"+(obj.selected-obj.files.length)+"\u5f20\u8fdb\u884c\u4e0a\u4f20\u3002"});
}
function startUpload(obj){
if(_c04==0){
_bfa.setWidth("838");
_bfa.body.style.height="455px";
_bf0.width=100;
_bf0.height=100;
_bf0.setBtnStatus(3);
$("flashUploadPreContent").style.display="none";
$("flashUploadMainContent").style.display="";
$("uploadContent").delClass("upload-content-pre");
$("uploadContent").addClass("upload-content");
$("uploadContent").style.width="";
$("uploadContent").style.height="";
$("uploadHead").style.display="";
$("flashUploadPreContent").remove();
$("flashUploadBtn").style.margin="";
$("flashUploadBtn").style.width="";
$("flashUploadBtn").style.height="";
$("flashUploadMainContent").style.width="795px";
$("flashUploadMainContent").style.height="455px";
$("picUl").style.display="";
$("uploadFoot").style.display="";
if(obj.files.length<2){
sbUser();
}
activities("http://upload.renren.com/activity/ajax?source=2");
_c04=1;
$("albumTitle").select();
}
var _c5d=obj.files,_c5e=_c5d.length,_c5f=[];
$("uploadFinish").addClass("gray-btn-flashUploader");
_bf7=0;
_bf5+=_c5e;
flashGrowUp();
_c5f[0]=$("picUl").innerHTML;
for(var i=0;i<_c5d.length;i++){
_c5f[i+1]="<li class=\"wait-upload\" id=\""+_c5d[i].id+"\" name=\""+_c5d[i].name+"\" status=\"wait\">"+"<p class=\"fileName\">"+_c5d[i].name+"</p>"+"<img class=\"alphaIMG\" src=\"http://a.xnimg.cn/a.gif\" style=\"background-image: url(http://a.xnimg.cn/n/apps/photo/cssimg/waitPic4FlashUploader.png);\"/>"+"<div class=\"error-state\" style=\"display:none;\">"+"</div>"+"<div class=\"upload-state-box\" style=\"display:none;\">"+"<span class=\"upload-state\">"+_c5d[i].name+"</span>"+"</div>"+"<div class=\"pic-oper\">"+"<div class=\"photo-del\">\u5220\u9664</div>"+"</div>"+"<div class=\"load-ico\" style=\"display:none;\"></div>"+"</li>";
}
$("picUl").innerHTML=_c5f.join("");
_c5f=[];
$(Sizzle("div.progress-bar-box")[0]).style.display="";
$("nowLoadingNum").innerHTML="\u6b63\u5728\u4e0a\u4f20"+_bf5+"\u5f20\u7167\u7247";
ajProgressBar(_bf4+_bf6,_bf5);
_bfa.reLocate();
}
function submitAllData(){
_c04==0;
XN.event.delEvent(window,"beforeunload",onbeforeunload_handler);
$("flashUploadAlbumData").innerHTML="<input type=\"hidden\" name=\"flag\" value=\""+_bf1.flag+"\"/>"+"<input type=\"hidden\" name=\"album.password\" value=\""+_bf1.password+"\"/>"+"<input type=\"hidden\" name=\"album.albumcontrol\" value=\""+_bf1.albumcontrol+"\"/>"+"<input type=\"hidden\" name=\"album.id\" value=\""+_bf1.id+"\"/>"+"<input type=\"hidden\" name=\"album.passwordProtected\" value=\""+_bf1.passwordProtected+"\"/>"+"<input type=\"hidden\" name=\"album.description\" value=\""+encodeURIComponent(_bf1.description)+"\"/>"+"<input type=\"hidden\" name=\"album.name\" value=\""+encodeURIComponent(_bf1.name)+"\"/>"+"<input type=\"hidden\" name=\"photos\" value=\""+encodeURIComponent(XN.json.build(_bf8))+"\"/>";
$("flashUploadAlbumData").submit();
$("flashUploadBtn").remove();
_bfa.remove();
}
function checkAlbumIsblank(){
if(_bf1.flag==1){
var _c61=$("albumTitle").value;
_c61=XN.string.trim(_c61);
if(XN.string.isBlank(_c61)){
$("albumNameTips").innerHTML="\u76f8\u518c\u540d\u5b57\u4e0d\u80fd\u4e3a\u7a7a";
$("albumNameTips").style.display="block";
return false;
}else{
if(_c61.length>30){
$("albumNameTips").innerHTML="\u957f\u5ea6\u4e0d\u80fd\u8d8530\u4e2a\u5b57";
$("albumNameTips").style.display="block";
return false;
}else{
$("albumNameTips").style.display="none";
_bf1.name=_c61;
new XN.net.xmlhttp({url:"http://photo.renren.com/ajaxcreatealbum.do",data:"title="+encodeURIComponent(_bf1.name)+"&control="+_bf1.albumcontrol+"&password="+encodeURIComponent(_bf1.password)+"&passwordProtected="+_bf1.passwordProtected,onSuccess:function(r){
var _c63=XN.JSON.parse(r.responseText);
if(_c63.albumid!=-1){
_bf1.id=_c63.albumid;
_bf1.flag=0;
XN.event.delEvent(window,"beforeunload",onbeforeunload_handler);
submitAllData();
}else{
_bf1.id=_c63.albumid;
_bf1.flag=1;
$("albumNameTips").innerHTML="\u62b1\u6b49\uff0c\u67d0\u4e9b\u4fe1\u606f\u4e0d\u80fd\u53d1\u5e03";
$("albumNameTips").style.display="block";
}
}});
}
}
}else{
$("albumNameTips").style.display="none";
XN.event.delEvent(window,"beforeunload",onbeforeunload_handler);
submitAllData();
return true;
}
}
function checkPasswordIsblank(){
if(_bf1.passwordProtected){
_pw=$("inputPW").value;
_pw=XN.string.trim(_pw);
if(XN.string.isBlank(_pw)||_pw.length>13){
$(Sizzle("div.password-tips")[0]).style.display="";
$(Sizzle("div.password-tips")[0]).style.color="#F00";
return false;
}else{
$(Sizzle("div.password-tips")[0]).style.display="none";
$(Sizzle("div.password-tips")[0]).style.color="#AAA";
_bf1.password=_pw;
return true;
}
}else{
$(Sizzle("div.password-tips")[0]).style.display="none";
$(Sizzle("div.password-tips")[0]).style.color="#AAA";
return true;
}
}
function endUpload(){
if(!_bf7){
return "not finish";
}
if(!checkPasswordIsblank()){
return false;
}
if(!checkAlbumIsblank()){
return false;
}
}
function addEvent2AlbumControl(){
XNEV.addEvent("limits","click",function(e){
e.preventDefault();
var e=e||window.event,_c65=e.target||e.srcElement,ddEl=Sizzle("dd",$("limits"));
if(_c65.id!="evo"&&_c65.id!="frd"&&_c65.id!="pw"&&_c65.id!="me"){
return false;
}
XN.array.each(ddEl,function(i,v){
v.style.display="";
});
$("albumNameBox").delClass("usepassword");
$("inputPW").style.display="none";
if(_c65.id=="evo"){
$("evo").style.display="none";
_bf1.albumcontrol=99;
_bf1.passwordProtected=false;
$(Sizzle("div.password-tips")[0]).style.display="none";
}else{
if(_c65.id=="frd"){
$("frd").style.display="none";
_bf1.albumcontrol=1;
_bf1.passwordProtected=false;
$(Sizzle("div.password-tips")[0]).style.display="none";
}else{
if(_c65.id=="pw"){
_bf1.albumcontrol=99;
_bf1.passwordProtected=true;
$("pw").style.display="none";
$("albumNameBox").addClass("usepassword");
$("inputPW").style.display="";
$(Sizzle("div.password-tips")[0]).style.display="";
$(Sizzle("div.password-tips")[0]).style.color="#AAA";
}else{
if(_c65.id=="me"){
_bf1.albumcontrol=-1;
_bf1.passwordProtected=false;
$("me").style.display="none";
$(Sizzle("div.password-tips")[0]).style.display="none";
}
}
}
}
$("cur").innerHTML=_c65.innerHTML;
$("limits").delClass("selected");
});
XNEV.addEvent(dlEl,"mouseover",function(e){
var e=e||window.event,_c6a=e.target||e.srcElement;
if(_c6a.id=="inputPW"){
dlEl.delClass("selected");
return false;
}
dlEl.addClass("selected");
},false);
XNEV.addEvent(dlEl,"mouseleave",function(e){
dlEl.delClass("selected");
},false);
}
function addEvent2HoverAlbumName(){
XN.element.hover(_bea,"selected");
}
function addEvent2CloseBtn(){
var _c6c=Sizzle("a.close-button",$("flashUploadDialog"))[0];
_c6c.parentNode.innerHTML="<span>\u4e0a\u4f20\u7167\u7247</span><a class=\"close-button\" href=\"#nogo\" style=\"\">\u5173\u95ed</a>";
_c6c=Sizzle("a.close-button",$("flashUploadDialog"))[0];
XN.event.addEvent(_c6c,"click",function(e){
var e=e||window.event;
e.preventDefault();
if(_c04==1){
var _c6e;
_c6e=XN.DO.alert({button:"\u8fd4\u56de\u4e0a\u4f20",title:"\u4e2d\u65ad\u672a\u5b8c\u6210\u7684\u4e0a\u4f20\uff1f",message:"\u672a\u5b8c\u6210\u4e0a\u4f20\uff0c\u6b64\u65f6\u5173\u95ed\u5c06\u4e22\u5931\u6b63\u5728\u4e0a\u4f20\u7684\u6240\u6709\u56fe\u7247",callback:function(r){
if(r){
$("flashUploadBtn").remove();
_bfa.remove();
This.remove();
}else{
return false;
This.remove();
}
}});
_c6e.addButton({text:"\u5f3a\u884c\u5173\u95ed",onclick:function(){
$("flashUploadBtn").remove();
_bfa.remove();
XN.event.delEvent(window,"beforeunload",onbeforeunload_handler);
}});
$(_c6e._buttons[1]).addClass("gray");
}else{
$("flashUploadBtn").remove();
_bfa.remove();
XN.event.delEvent(window,"beforeunload",onbeforeunload_handler);
}
});
}
function addEvent2WindowUnload(){
XNEV.addEvent(document,"keydown",function(e){
var e=e||window.event,_c71;
if(e.keyCode==27){
if(_c04==1){
_c71=XN.DO.alert({button:"\u8fd4\u56de\u4e0a\u4f20",title:"\u5173\u95ed\u4e0a\u4f20",message:"\u672a\u5b8c\u6210\u4e0a\u4f20\uff0c\u6b64\u65f6\u5173\u95ed\u5c06\u4e22\u5931\u6b63\u5728\u4e0a\u4f20\u7684\u6240\u6709\u56fe\u7247",callback:function(r){
if(r){
$("flashUploadBtn").remove();
_bfa.remove();
This.remove();
}else{
return false;
This.remove();
}
}});
_c71.addButton({text:"\u5f3a\u884c\u5173\u95ed",onclick:function(){
$("flashUploadBtn").remove();
_bfa.remove();
XN.event.delEvent(window,"beforeunload",onbeforeunload_handler);
}});
$(_c71._buttons[1]).addClass("gray");
_bfa.show();
_bfa.reLocate();
}
}
});
XNEV.addEvent(window,"beforeunload",onbeforeunload_handler);
}
function notLogin(){
XN.DO.alert({title:"\u4e0a\u4f20\u9519\u8bef",message:"\u5f53\u524d\u7528\u6237\u672a\u767b\u5f55\uff0c\u6216\u8005\u5728\u5176\u4ed6\u5730\u65b9\u4e0b\u7ebf\u3002\u8bf7\u5237\u65b0\u9875\u9762\u6216\u8005\u91cd\u65b0\u767b\u5f55\uff01"});
}
function invalidImgFile(obj){
++_bf6;
var id=obj.file.id,_c75=$(id);
$(Sizzle("p.fileName",_c75)[0]).style.display="none";
$(Sizzle("div.error-state",_c75)[0]).style.display="";
$(Sizzle("div.upload-state-box",_c75)[0]).style.display="none";
$(Sizzle("div.pic-oper",_c75)[0]).style.display="";
$(Sizzle("div.load-ico",_c75)[0]).style.display="none";
$(Sizzle("div.error-state",_c75)[0]).innerHTML="\u56fe\u7247\u683c\u5f0f\u9519\u8bef";
ajProgressBar(_bf4+_bf6,_bf5);
_c75.setAttribute("status","err");
if(_bf6+_bf4==_bf5){
_bf7=1;
$("uploadFinish").delClass("gray-btn-flashUploader");
$(Sizzle("div.progress-bar-box")[0]).style.display="none";
if(_bf6==0){
$("nowLoadingNum").innerHTML="\u6210\u529f\u4e0a\u4f20"+_bf4+"\u5f20\uff01";
}else{
$("nowLoadingNum").innerHTML="\u6210\u529f\u4e0a\u4f20"+_bf4+"\u5f20\uff0c\u5931\u8d25"+_bf6+"\u5f20\uff01";
}
}
}
function initParams(){
_bf1.password="";
_bf1.albumcontrol=99;
_bf1.flag=0;
_bf1.id=0;
_bf1.passwordProtected=false;
_bf1.description="";
_bf4=0;
_bf5=0;
_bf6=0;
_bf7=0;
_bf8=[];
_bf9=[];
_bf2=XN.user.id;
_c01="www.renren.com";
_c02="photo.renren.com";
_c04=0;
isIE=XN.browser.IE;
_bfc={"picUploadNumOnce":100,"flashReadyDo":"XN.flashUpload.flashReady"};
_bfd={"wmode":"transparent","allowscriptaccess":"always"};
_bfe="http://upload."+XN.env.domain+"/upload/"+_bf2+"/photo/save";
_bff=function(){
var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){
var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;
if(typeof t.plugins!=D&&typeof t.plugins[S]==r){
ab=t.plugins[S].description;
if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){
T=true;
X=false;
ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");
ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);
ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);
ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0;
}
}else{
if(typeof O.ActiveXObject!=D){
try{
var ad=new ActiveXObject(W);
if(ad){
ab=ad.GetVariable("$version");
if(ab){
X=true;
ab=ab.split(" ")[1].split(",");
ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)];
}
}
}
catch(Z){
}
}
}
return {w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac};
}(),k=function(){
if(!M.w3){
return;
}
if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){
f();
}
if(!J){
if(typeof j.addEventListener!=D){
j.addEventListener("DOMContentLoaded",f,false);
}
if(M.ie&&M.win){
j.attachEvent(x,function(){
if(j.readyState=="complete"){
j.detachEvent(x,arguments.callee);
f();
}
});
if(O==top){
(function(){
if(J){
return;
}
try{
j.documentElement.doScroll("left");
}
catch(X){
setTimeout(arguments.callee,0);
return;
}
f();
})();
}
}
if(M.wk){
(function(){
if(J){
return;
}
if(!/loaded|complete/.test(j.readyState)){
setTimeout(arguments.callee,0);
return;
}
f();
})();
}
s(f);
}
}();
function f(){
if(J){
return;
}
try{
var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));
Z.parentNode.removeChild(Z);
}
catch(aa){
return;
}
J=true;
var X=U.length;
for(var Y=0;Y<X;Y++){
U[Y]();
}
}
function K(X){
if(J){
X();
}else{
U[U.length]=X;
}
}
function s(Y){
if(typeof O.addEventListener!=D){
O.addEventListener("load",Y,false);
}else{
if(typeof j.addEventListener!=D){
j.addEventListener("load",Y,false);
}else{
if(typeof O.attachEvent!=D){
i(O,"onload",Y);
}else{
if(typeof O.onload=="function"){
var X=O.onload;
O.onload=function(){
X();
Y();
};
}else{
O.onload=Y;
}
}
}
}
}
function h(){
if(T){
V();
}else{
H();
}
}
function V(){
var X=j.getElementsByTagName("body")[0];
var aa=C(r);
aa.setAttribute("type",q);
var Z=X.appendChild(aa);
if(Z){
var Y=0;
(function(){
if(typeof Z.GetVariable!=D){
var ab=Z.GetVariable("$version");
if(ab){
ab=ab.split(" ")[1].split(",");
M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)];
}
}else{
if(Y<10){
Y++;
setTimeout(arguments.callee,10);
return;
}
}
X.removeChild(aa);
Z=null;
H();
})();
}else{
H();
}
}
function H(){
var ag=o.length;
if(ag>0){
for(var af=0;af<ag;af++){
var Y=o[af].id;
var ab=o[af].callbackFn;
var aa={success:false,id:Y};
if(M.pv[0]>0){
var ae=c(Y);
if(ae){
if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){
w(Y,true);
if(ab){
aa.success=true;
aa.ref=z(Y);
ab(aa);
}
}else{
if(o[af].expressInstall&&A()){
var ai={};
ai.data=o[af].expressInstall;
ai.width=ae.getAttribute("width")||"0";
ai.height=ae.getAttribute("height")||"0";
if(ae.getAttribute("class")){
ai.styleclass=ae.getAttribute("class");
}
if(ae.getAttribute("align")){
ai.align=ae.getAttribute("align");
}
var ah={};
var X=ae.getElementsByTagName("param");
var ac=X.length;
for(var ad=0;ad<ac;ad++){
if(X[ad].getAttribute("name").toLowerCase()!="movie"){
ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value");
}
}
P(ai,ah,Y,ab);
}else{
p(ae);
if(ab){
ab(aa);
}
}
}
}
}else{
w(Y,true);
if(ab){
var Z=z(Y);
if(Z&&typeof Z.SetVariable!=D){
aa.success=true;
aa.ref=Z;
}
ab(aa);
}
}
}
}
}
function z(aa){
var X=null;
var Y=c(aa);
if(Y&&Y.nodeName=="OBJECT"){
if(typeof Y.SetVariable!=D){
X=Y;
}else{
var Z=Y.getElementsByTagName(r)[0];
if(Z){
X=Z;
}
}
}
return X;
}
function A(){
return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312);
}
function P(aa,ab,X,Z){
a=true;
E=Z||null;
B={success:false,id:X};
var ae=c(X);
if(ae){
if(ae.nodeName=="OBJECT"){
l=g(ae);
Q=null;
}else{
l=ae;
Q=X;
}
aa.id=R;
if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){
aa.width="310";
}
if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){
aa.height="137";
}
j.title=j.title.slice(0,47)+" - Flash Player Installation";
var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;
if(typeof ab.flashvars!=D){
ab.flashvars+="&"+ac;
}else{
ab.flashvars=ac;
}
if(M.ie&&M.win&&ae.readyState!=4){
var Y=C("div");
X+="SWFObjectNew";
Y.setAttribute("id",X);
ae.parentNode.insertBefore(Y,ae);
ae.style.display="none";
(function(){
if(ae.readyState==4){
ae.parentNode.removeChild(ae);
}else{
setTimeout(arguments.callee,10);
}
})();
}
u(aa,ab,X);
}
}
function p(Y){
if(M.ie&&M.win&&Y.readyState!=4){
var X=C("div");
Y.parentNode.insertBefore(X,Y);
X.parentNode.replaceChild(g(Y),X);
Y.style.display="none";
(function(){
if(Y.readyState==4){
Y.parentNode.removeChild(Y);
}else{
setTimeout(arguments.callee,10);
}
})();
}else{
Y.parentNode.replaceChild(g(Y),Y);
}
}
function g(ab){
var aa=C("div");
if(M.win&&M.ie){
aa.innerHTML=ab.innerHTML;
}else{
var Y=ab.getElementsByTagName(r)[0];
if(Y){
var ad=Y.childNodes;
if(ad){
var X=ad.length;
for(var Z=0;Z<X;Z++){
if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){
aa.appendChild(ad[Z].cloneNode(true));
}
}
}
}
}
return aa;
}
function u(ai,ag,Y){
var X,aa=c(Y);
if(M.wk&&M.wk<312){
return X;
}
if(aa){
if(typeof ai.id==D){
ai.id=Y;
}
if(M.ie&&M.win){
var ah="";
for(var ae in ai){
if(ai[ae]!=Object.prototype[ae]){
if(ae.toLowerCase()=="data"){
ag.movie=ai[ae];
}else{
if(ae.toLowerCase()=="styleclass"){
ah+=" class=\""+ai[ae]+"\"";
}else{
if(ae.toLowerCase()!="classid"){
ah+=" "+ae+"=\""+ai[ae]+"\"";
}
}
}
}
}
var af="";
for(var ad in ag){
if(ag[ad]!=Object.prototype[ad]){
af+="<param name=\""+ad+"\" value=\""+ag[ad]+"\" />";
}
}
aa.outerHTML="<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\""+ah+">"+af+"</object>";
N[N.length]=ai.id;
X=c(ai.id);
}else{
var Z=C(r);
Z.setAttribute("type",q);
for(var ac in ai){
if(ai[ac]!=Object.prototype[ac]){
if(ac.toLowerCase()=="styleclass"){
Z.setAttribute("class",ai[ac]);
}else{
if(ac.toLowerCase()!="classid"){
Z.setAttribute(ac,ai[ac]);
}
}
}
}
for(var ab in ag){
if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){
e(Z,ab,ag[ab]);
}
}
aa.parentNode.replaceChild(Z,aa);
X=Z;
}
}
return X;
}
function e(Z,X,Y){
var aa=C("param");
aa.setAttribute("name",X);
aa.setAttribute("value",Y);
Z.appendChild(aa);
}
function y(Y){
var X=c(Y);
if(X&&X.nodeName=="OBJECT"){
if(M.ie&&M.win){
X.style.display="none";
(function(){
if(X.readyState==4){
b(Y);
}else{
setTimeout(arguments.callee,10);
}
})();
}else{
X.parentNode.removeChild(X);
}
}
}
function b(Z){
var Y=c(Z);
if(Y){
for(var X in Y){
if(typeof Y[X]=="function"){
Y[X]=null;
}
}
Y.parentNode.removeChild(Y);
}
}
function c(Z){
var X=null;
try{
X=j.getElementById(Z);
}
catch(Y){
}
return X;
}
function C(X){
return j.createElement(X);
}
function i(Z,X,Y){
Z.attachEvent(X,Y);
I[I.length]=[Z,X,Y];
}
function F(Z){
var Y=M.pv,X=Z.split(".");
X[0]=parseInt(X[0],10);
X[1]=parseInt(X[1],10)||0;
X[2]=parseInt(X[2],10)||0;
return (Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false;
}
function v(ac,Y,ad,ab){
if(M.ie&&M.mac){
return;
}
var aa=j.getElementsByTagName("head")[0];
if(!aa){
return;
}
var X=(ad&&typeof ad=="string")?ad:"screen";
if(ab){
n=null;
G=null;
}
if(!n||G!=X){
var Z=C("style");
Z.setAttribute("type","text/css");
Z.setAttribute("media",X);
n=aa.appendChild(Z);
if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){
n=j.styleSheets[j.styleSheets.length-1];
}
G=X;
}
if(M.ie&&M.win){
if(n&&typeof n.addRule==r){
n.addRule(ac,Y);
}
}else{
if(n&&typeof j.createTextNode!=D){
n.appendChild(j.createTextNode(ac+" {"+Y+"}"));
}
}
}
function w(Z,X){
if(!m){
return;
}
var Y=X?"visible":"hidden";
if(J&&c(Z)){
c(Z).style.visibility=Y;
}else{
v("#"+Z,"visibility:"+Y);
}
}
function L(Y){
var Z=/[\\\"<>\.;]/;
var X=Z.exec(Y)!=null;
return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y;
}
var d=function(){
if(M.ie&&M.win){
window.attachEvent("onunload",function(){
var ac=I.length;
for(var ab=0;ab<ac;ab++){
I[ab][0].detachEvent(I[ab][1],I[ab][2]);
}
var Z=N.length;
for(var aa=0;aa<Z;aa++){
y(N[aa]);
}
for(var Y in M){
M[Y]=null;
}
M=null;
for(var X in _bff){
_bff[X]=null;
}
_bff=null;
});
}
}();
return {registerObject:function(ab,X,aa,Z){
if(M.w3&&ab&&X){
var Y={};
Y.id=ab;
Y.swfVersion=X;
Y.expressInstall=aa;
Y.callbackFn=Z;
o[o.length]=Y;
w(ab,false);
}else{
if(Z){
Z({success:false,id:ab});
}
}
},getObjectById:function(X){
if(M.w3){
return z(X);
}
},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){
var X={success:false,id:ah};
if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){
w(ah,false);
K(function(){
ae+="";
ag+="";
var aj={};
if(af&&typeof af===r){
for(var al in af){
aj[al]=af[al];
}
}
aj.data=ab;
aj.width=ae;
aj.height=ag;
var am={};
if(ad&&typeof ad===r){
for(var ak in ad){
am[ak]=ad[ak];
}
}
if(Z&&typeof Z===r){
for(var ai in Z){
if(typeof am.flashvars!=D){
am.flashvars+="&"+ai+"="+Z[ai];
}else{
am.flashvars=ai+"="+Z[ai];
}
}
}
if(F(Y)){
var an=u(aj,am,ah);
if(aj.id==ah){
w(ah,true);
}
X.success=true;
X.ref=an;
}else{
if(aa&&A()){
aj.data=aa;
P(aj,am,ah,ac);
return;
}else{
w(ah,true);
}
}
if(ac){
ac(X);
}
});
}else{
if(ac){
ac(X);
}
}
},switchOffAutoHideShow:function(){
m=false;
},ua:M,getFlashPlayerVersion:function(){
return {major:M.pv[0],minor:M.pv[1],release:M.pv[2]};
},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){
if(M.w3){
return u(Z,Y,X);
}else{
return undefined;
}
},showExpressInstall:function(Z,aa,X,Y){
if(M.w3&&A()){
P(Z,aa,X,Y);
}
},removeSWF:function(X){
if(M.w3){
y(X);
}
},createCSS:function(aa,Z,Y,X){
if(M.w3){
v(aa,Z,Y,X);
}
},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){
var Z=j.location.search||j.location.hash;
if(Z){
if(/\?/.test(Z)){
Z=Z.split("?")[1];
}
if(aa==null){
return L(Z);
}
var Y=Z.split("&");
for(var X=0;X<Y.length;X++){
if(Y[X].substring(0,Y[X].indexOf("="))==aa){
return L(Y[X].substring((Y[X].indexOf("=")+1)));
}
}
}
return "";
},expressInstallCallback:function(){
if(a){
var X=c(R);
if(X&&l){
X.parentNode.replaceChild(l,X);
if(Q){
w(Q,true);
if(M.ie&&M.win){
l.style.display="block";
}
}
if(E){
E(B);
}
}
a=false;
}
}};
}();
return true;
}
function initFlash(){
initParams();
_bfa=XN.DO.confirm({title:"\u4e0a\u4f20\u7167\u7247",message:"<div id=\"flashUploadMainContent\" class=\"content\" style=\"\">"+"<div id=\"uploadHead\" class=\"upload-head clearfix\" style=\"display:none;\">"+"<span id=\"newOrOld\" class=\"txt-block\">\u65b0\u5efa\u76f8\u518c\uff1a</span>"+"<div id=\"albumNameBox\" class=\"album-name-box\">"+"<input id=\"albumTitle\" maxlength=\"30\" type=\"text\" class=\"text-input\" />"+"<dl id=\"limits\" class=\"tovisit\">"+"<dt>"+"<span id=\"cur\" class=\"arrow-down\">\u6240\u6709\u4eba\u53ef\u89c1</span>"+"<input id=\"inputPW\" maxlength=\"13\" class=\"password-txt\" style=\"display:none;\" type=\"password\">"+"</dt>"+"<dd id=\"evo\" style=\"display:none;\">\u6240\u6709\u4eba\u53ef\u89c1</dd>"+"<dd id=\"frd\" style=\"display:;\">\u4ec5\u597d\u53cb\u53ef\u89c1</dd>"+"<dd id=\"pw\" style=\"display:;\">\u7528\u5bc6\u7801\u8bbf\u95ee</dd>"+"<dd id=\"me\" style=\"display:;\">\u53ea\u81ea\u5df1\u53ef\u89c1</dd>"+"</dl>"+"<div id=\"albumNameTips\" style=\"display:none;\">\u76f8\u518c\u540d\u5b57\u4e0d\u80fd\u4e3a\u7a7a</div>"+"<div class=\"password-tips\" style=\"display:none;\">\u8bf7\u8bbe\u7f6e1-13\u4f4d\u5bc6\u7801</div>"+"</div>"+"<div id=\"albumList\" class=\"album-name-box appoint\" style=\"display:none;\">"+"<div id=\"appointAlbum\" class=\"appoint-album\">"+"<div id=\"selectAlbum\" class=\"select-album\"><a href=\"javascript:void(0);\" class=\"arrow-down\"></a><span class=\"album-name\"  style=\"height:20px; display:block; overflow:hidden; float:left; max-width:216px;\">\u8bfb\u53d6\u76f8\u518c\u4fe1\u606f\u5931\u8d25</span><span class=\"photo-num-flashUploader\">(0)</span></div>"+"<div class=\"sublist\">"+"<dl id=\"albumNameList\" class=\"album-name-list\">"+"</dl>"+"<div class=\"search-album\">"+"<input id=\"searchTxt\" type=\"text\" class=\"search-txt\" />"+"<span class=\"all-album\"></span>"+"</div>\t"+"</div>"+"</div>"+"</div>"+"<span class=\"or\">\u6216</span><a class=\"toggleAlbum txt-block\" id=\"oldAlbum\" href=\"javascript:void(0);\">\u4e0a\u4f20\u5230\u5df2\u6709\u76f8\u518c</a>"+"</div>"+"<div class=\"activity-tip-flashUploader\" id=\"activityTipFlashUploader\" style=\"display:none;\">"+"</div>"+"<div id=\"uploadContent\" class=\"upload-content-pre\" style=\"position:relative; overflow-y:auto;width:420px; height:180px;\">"+"<div class=\"pop-upload-tip\" id=\"popUploadTip\" style=\"display:none;\">"+"<div class=\"top-arrow\"></div>"+"<p>\u5728\u9009\u62e9\u7167\u7247\u65f6\uff0c\u4f60\u53ef\u4ee5\u6846\u9009\u3001\u4e5f\u53ef\u4ee5\u6309\u4f4fctrl\u70b9\u9009\u591a\u5f20</p>"+"</div>"+"<span id=\"slogan\" style=\"display:none;\">\u6bcf\u6b21\u6700\u591a\u53ef\u4ee5\u4e0a\u4f20100\u5f20\u7167\u7247</span>"+"<span id=\"flashUploadBtn\" style=\"display:inline-block; position:absolute; *zoom:1; margin:30px 0 0 20px; width:204px; height:44px;\">"+"<div id=\"flashDiv\">"+"</div>"+"</span>"+"<ul id=\"picUl\" class=\"upload-list-pic\" style=\"display:none;\">"+"</ul>"+"<div id=\"flashUploadPreContent\" class=\"clearfix\" style=\"width:410px; margin-top:-3px;\">"+"<div class=\"upload-png-box\" style=\"width:117px; height:117px; padding:10px 20px; background-color:#F8F8F8; float:right;\">"+"<img width=\"117\" height=\"70\" src=\"http://a.xnimg.cn/n/apps/photo/res/upload-example.png\" />"+"<p class=\"png-tips\" style=\"color:#888!important; margin-top:8px;\">\u53ef\u4ee5\u9009\u62e9\u591a\u5f20\u7167\u7247\uff0c<br />\u6700\u591a\u652f\u6301100\u5f20</p>"+"</div>"+"<div class=\"upload-btn-box\" style=\"float:left; width:204px; padding:20px; margin-top:37px; *margin-top:30px; height:70px; background:url(http://a.xnimg.cn/imgpro/indicator/blue_large.gif) top no-repeat; *position:relative; *zoom:1; *z-index:-1\">"+"<p class=\"btn-tips\" style=\"color:#888!important; text-align:center; margin-top:60px; *margin-top:80px;\">\u8fd8\u53ef\u4ee5\u4f7f\u7528<span id=\"isIE\"><a id=\"IEUser\" href=\"http://upload.renren.com/addphotox.do\">\u6781\u901f\u4e0a\u4f20</a>\u6216</span><a href=\"http://upload.renren.com/addphotoPlain.do\">\u5176\u4ed6\u4e0a\u4f20</a></p>"+"</div>"+"</div>"+"</div>"+"<div id=\"uploadFoot\" class=\"upload-foot clearfix\" style=\"display:none;\">"+"<input id=\"uploadFinish\" type=\"submit\" class=\"upload-done-btn gray-btn-flashUploader\" value=\"\u5b8c\u6210\u4e0a\u4f20\" />"+"<div class=\"progress clearfix\">"+"<span id=\"nowLoadingNum\" class=\"progress-tip\">\u6b63\u5728\u4e0a\u4f200\u5f20\u7167\u7247</span>"+"<div class=\"progress-bar-box\">"+"<span class=\"progress-bar\"><em id=\"progressBar\" class=\"bg\" style=\"width:0%;\"></em></span>"+"<span id=\"precent\" class=\"gray\">0/0</span>"+"</div>"+"</div>"+"</div>"+"</div>"+"<form id=\"flashUploadAlbumData\" action="+_bfe+" method=\"post\">"+"</form>",width:450,showCloseButton:true});
_bfa.reLocate=reLocate;
_bfa.footer.hide();
XN.flashUpload.flashUploadDialog=_bfa;
_bfa.body.style.height="133px";
_bfa.body.style.overflow="hidden";
_bfa.container.id="flashUploadDialog";
_bfb=$("flashUploadDialog");
_be4=$("progressBar");
_be5=$("precent");
_be6=$("nowLoadingNum");
dlEl=$("limits");
_be8=$("albumNameBox");
_be9=$("selectAlbum");
_bea=$("appointAlbum");
_beb=$("albumNameList");
_bec=$("searchTxt");
_bed=$("inputTips");
_bee=$(Sizzle("span",_be9)[0]);
_bef=$(Sizzle("span",_be9)[1]);
detectIEUserAndActiveX();
addEvent2AlbumControl();
addEvent2HoverAlbumName();
addEvent2CloseBtn();
addEvent2WindowUnload();
_bff.embedSWF(FLASH_UPLOADER_URL,"flashDiv","202","42","9.0.0","",_bfc,_bfd);
return true;
}
function flashUploadPopup(){
if(_c08){
return false;
}
XN.event.addEvent(document,"click",function(e){
_c08=true;
var e=e||window.event,el=XN.event.element(e),_d21,_d22;
if(XN.element.hasClassName(el,"flashUploader")||XN.element.hasClassName($(el.parentNode),"flashUploader")){
e.preventDefault();
if(XN.browser.IE&&isInstalledActiveXObject()&&window.location.pathname!="/addphotox.do"){
window.location="http://upload.renren.com/addphotox.do";
return true;
}
if(el.nodeName=="SPAN"){
el=$(el.parentNode);
}
_d21=el.href;
_d22=0;
_c00=0;
if(_d21.indexOf("id=")>=0){
_d21=_d21.substring(_d21.indexOf("id=")+3);
_d21=_d21.substring(0,_d21.indexOf("&"));
_d22=parseInt(_d21);
if(_d22!=0){
_c00=_d22;
}
}
XN.loadFile("http://s.xnimg.cn/n/core/modules/flashUploader/upload-pop-all-min.css",function(){
initFlash();
});
}
});
}
XN.flashUpload.flashUploadPopup=flashUploadPopup;
XN.flashUpload.startUpload=startUpload;
XN.flashUpload.changeStyle2pros=changeStyle2pros;
XN.flashUpload.changeStyle2ing=changeStyle2ing;
XN.flashUpload.changeStyle2ed=changeStyle2ed;
XN.flashUpload.delPhotoData=delPhotoData;
XN.flashUpload.changeStyle2netErr=changeStyle2netErr;
XN.flashUpload.uploadError=uploadError;
XN.flashUpload.initFlash=initFlash;
XN.flashUpload.queuedError=queuedError;
XN.flashUpload.notLogin=notLogin;
XN.flashUpload.queueLimitExceeded=queueLimitExceeded;
XN.flashUpload.invalidImgFile=invalidImgFile;
function flashReady(){
_bf0=$("flashDiv");
getToken();
XNEV.addEvent($(Sizzle("a.toggleAlbum")[0]),"click",function(e){
var e=e||window.event;
el=XNEV.element(e);
e.preventDefault();
toggleAlbum(el);
});
XNEV.addEvent("uploadFinish","click",function(e){
var e=e||window.event;
e.preventDefault();
endUpload();
});
XNEV.addEvent("picUl","click",function(e){
var e=e||window.event;
el=XNEV.element(e);
if(el.className=="photo-del"){
var _d26=el.parentNode.parentNode;
delPhoto(el);
}
});
XN.flashUpload.flashDiv=_bf0;
_bf1.name=defaultAlbumGen();
albumListGen(_bf2);
_bf0.setUploadUrl("http://upload.renren.com/upload.fcgi?pagetype=addphotoflash&hostid="+_bf2+"&tick="+_c06);
_bf0.addEventListener("fileQueued","XN.flashUpload.startUpload");
_bf0.addEventListener("fileProcessStart","XN.flashUpload.changeStyle2pros");
_bf0.addEventListener("fileUploadProgress","XN.flashUpload.changeStyle2ing");
_bf0.addEventListener("fileUploadSuccess","XN.flashUpload.changeStyle2ed");
_bf0.addEventListener("fileUploadCanceled","XN.flashUpload.delPhotoData");
_bf0.addEventListener("networkError","XN.flashUpload.changeStyle2netErr");
_bf0.addEventListener("uploadError","XN.flashUpload.uploadError");
_bf0.addEventListener("queuedError","XN.flashUpload.queuedError");
_bf0.addEventListener("notLogin","XN.flashUpload.notLogin");
_bf0.addEventListener("queueLimitExceeded","XN.flashUpload.queueLimitExceeded");
_bf0.addEventListener("invalidImgFile","XN.flashUpload.invalidImgFile");
}
XN.flashUpload.flashReady=flashReady;
})();
XN.dom.ready(function(){
XN.flashUpload.flashUploadPopup();
});

